OFFSET
0,5
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
C(n, r+0)+C(n, r+4)+C(n, r+8)+... where r = 0 if n odd, r = 2 if n even.
G.f.: (-x^3+x^2+x)/[(1-2x)(1+2x+2x^2)].
a(0)=0; a(n) = ( 2^n - (-1-i)^n - (-1+i)^n )/4, i=sqrt(-1). - C. Ronaldo (aga_new_ac(AT)hotmail.com), Dec 16 2004
a(n) = 2*a(n-2) + 4*a(n-3) for n>3. - Colin Barker, Aug 02 2019
MAPLE
0, seq(1/4*2^k-1/4*(-1-I)^k-1/4*(-1+I)^k, k=1..40); seq(coeff(convert(series((-x^3+x^2+x)/((1-2*x)*(1+2*x+2*x^2)), x, 50), polynom), x, i), i=0..40); # C. Ronaldo (aga_new_ac(AT)hotmail.com), Dec 16 2004
MATHEMATICA
LinearRecurrence[{0, 2, 4}, {0, 1, 1, 1}, 40] (* Harvey P. Dale, Mar 31 2020 *)
PROG
(PARI) concat(0, Vec(x*(1 + x - x^2) / ((1 - 2*x)*(1 + 2*x + 2*x^2)) + O(x^40))) \\ Colin Barker, Aug 02 2019
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
STATUS
approved