OFFSET
0,3
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (0,2,3).
FORMULA
From Paul Barry, Oct 16 2004: (Start)
a(n) = 2*a(n-2) + 3*a(n-3).
a(n) = Sum_{k=0..floor(n/2)} binomial(k, n-2*k)*2^k*(3/2)^(n-2*k). (End)
MATHEMATICA
CoefficientList[Series[1/(1-2*x^2-3*x^3), {x, 0, 40}], x] (* Vincenzo Librandi, Jun 11 2012 *)
LinearRecurrence[{0, 2, 3}, {1, 0, 2}, 40] (* G. C. Greubel, Jul 04 2019 *)
PROG
(Magma) I:=[1, 0, 2]; [n le 3 select I[n] else 2*Self(n-2)+3*Self(n-3): n in [1..40]]; // Vincenzo Librandi, Jun 11 2012
(PARI) Vec(1/(1-2*x^2-3*x^3)+O(x^40)) \\ Charles R Greathouse IV, Sep 26 2012
(Sage) (1/(1-2*x-3*x^3)).series(x, 40).coefficients(x, sparse=False) # G. C. Greubel, Jul 04 2019
(GAP) a:=[1, 0, 2];; for n in [4..40] do a[n]:=2*a[n-2]+3*a[n-3]; od; a; # G. C. Greubel, Jul 04 2019
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved