OFFSET
0,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..600
Index entries for linear recurrences with constant coefficients, signature (40,-224,-1280,8192).
FORMULA
a(n) = 32*a(n-1) + 32*a(n-2) - 1024*a(n-3)- 2^(3n - 3)*3 with n>2, a(0)=1, a(1)=20, a(2)=288.
a(n) = 2^(5n/2-1)*(2^(5n/2-1) + 2^(n/2-1) + 1) if n is even,
a(n) = 2^((5n-1)/2-1)*(2^((5n-1)/2) + 2^((n-1)/2) + 5) if n is odd.
G.f.: (1-20*x-288*x^2+2880*x^3)/((1-8*x)*(1-32*x)*(1-32*x^2)). [Bruno Berselli, May 17 2013]
MATHEMATICA
LinearRecurrence[{40, -224, -1280, 8192}, {1, 20, 288, 8640}, 20] (* Bruno Berselli, May 17 2013 *)
CoefficientList[Series[(1 - 20 x - 288 x^2 + 2880 x^3) / ((1 - 8 x) (1 - 32 x) (1 - 32 x^2)), {x, 0, 30}], x] (* Vincenzo Librandi, Sep 04 2013 *)
PROG
(Magma) I:=[1, 20, 288, 8640]; [n le 4 select I[n] else 40*Self(n-1)-224*Self(n-2)-1280*Self(n-3)+8192*Self(n-4): n in [1..25]]; // Vincenzo Librandi, Sep 04 2013
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Yosu Yurramendi, May 16 2013
STATUS
approved