OFFSET
0,2
COMMENTS
In general, Sum_{k=0..floor(n/2)} C(2n-2k,2k)a^k*b^(n-k) has expansion (1-bx-abx^2)/(1-2bx-(2ab-b^2)x^2-2ab^2*x^3+(ab)^2*x^4).
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (4,0,8,-4).
FORMULA
G.f.: (1-2x-2x^2)/(1-4x-8x^3+4x^4).
a(n) = 4a(n-1)+8a(n-3)-4a(n-4).
MATHEMATICA
LinearRecurrence[{4, 0, 8, -4}, {1, 2, 6, 32}, 40] (* or *) CoefficientList[Series[(1-2x-2x^2)/(1-4x-8x^3+4x^4), {x, 0, 40}], x] (* Vincenzo Librandi, Jun 26 2012 *)
PROG
(Magma) I:=[1, 2, 6, 32]; [n le 4 select I[n] else 4*Self(n-1)+8*Self(n-3)-4*Self(n-4): n in [1..30]]; // Vincenzo Librandi. Jun 26 2012
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Paul Barry, Jun 04 2005
STATUS
approved