OFFSET
0,4
LINKS
Colin Barker, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (0,2,4).
FORMULA
a(n) = C(n, r+0) + C(n, r+4) + C(n, r+8) + ... where r = 2 if n odd, r = 0 if n even.
From Colin Barker, Aug 02 2019: (Start)
G.f.: (1 - x^2 - x^3) / ((1 - 2*x)*(1 + 2*x + 2*x^2)). - Creighton Dement, Apr 29 2005, corrected by Colin Barker, Aug 02 2019
a(n) = ((-1-i)^n + (-1+i)^n + 2^n) / 4 for n>0.
a(n) = 2*a(n-2) + 4*a(n-3) for n>3.
(End)
PROG
(PARI) Vec((1 - x^2 - x^3) / ((1 - 2*x)*(1 + 2*x + 2*x^2)) + O(x^40)) \\ Colin Barker, Aug 02 2019
(Magma) I:=[1, 0, 1, 3]; [m le 4 select I[m] else 2*Self(m-2)+4*Self(m-3):m in [1..33]]; // Marius A. Burtea, Aug 02 2019
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
STATUS
approved