OFFSET
0,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..400
Index entries for linear recurrences with constant coefficients, signature (144,-1920,-18432,262144).
FORMULA
a(n) = (2^7)*a(n-1) + (2^7)*a(n-2) - ((2^7)^2)*a(n-3) - 2^(4n-3)*7 with n>2, a(0)=1, a(1)=72, a(2)=4224.
a(n) = 2^(7n/2-1)*(2^(7n/2-1) + 2^(n/2-1) + 1) if n is even,
a(n) = 2^((7n-1)/2-1)*(2^((7n-1)/2) + 2^((n-1)/2) + 9) if n is odd.
G.f.: (1-72*x-4224*x^2+78336*x^3)/((1-16*x)*(1-128*x)*(1-128*x^2)). [Bruno Berselli, May 17 2013]
MATHEMATICA
LinearRecurrence[{144, -1920, -18432, 262144}, {1, 72, 4224, 529920}, 20] (* Bruno Berselli, May 17 2013 *)
CoefficientList[Series[(1 - 72 x - 4224 x^2 + 78336 x^3) / ((1 - 16 x) (1 - 128 x) (1 - 128 x^2)), {x, 0, 30}], x] (* Vincenzo Librandi, Sep 04 2013 *)
PROG
(Magma) I:=[1, 72, 4224, 529920]; [n le 4 select I[n] else 144*Self(n-1)-1920*Self(n-2)-18432*Self(n-3)+262144*Self(n-4): n in [1..20]]; // Vincenzo Librandi, Sep 04 2013
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Yosu Yurramendi, May 16 2013
STATUS
approved