OFFSET
0,5
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (2,-1,0,3).
FORMULA
G.f.: (1-x)/((1-x)^2-3*x^4).
a(n) = 2*a(n-1) - a(n-2) + 3*a(n-4).
MATHEMATICA
Table[Sum[Binomial[n-2k, 2k]3^k, {k, 0, Floor[n/4]}], {n, 0, 40}] (* or *) LinearRecurrence[{2, -1, 0, 3}, {1, 1, 1, 1}, 40] (* Harvey P. Dale, Dec 04 2011 *)
PROG
(PARI) x='x+O('x^30); Vec((1-x)/((1-x)^2-3*x^4)) \\ G. C. Greubel, Feb 03 2018
(Magma) I:=[1, 1, 1, 1]; [n le 4 select I[n] else 2*Self(n-1) - Self(n-2) + 3*Self(n-4): n in [1..30]]; // G. C. Greubel, Feb 03 2018
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Paul Barry, Sep 16 2004
STATUS
approved