OFFSET
0,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (12,-24,-96,256).
FORMULA
a(n) = 8*a(n-1) + 8*a(n-2) - 64*a(n-3) - 2^(2n-3) with n>2, with a(0)=1, a(1)=6, a(2)=24.
a(n) = 2^(3n/2-1)*(2^(3n/2-1) + 2^(n/2-1) + 1) if n is even,
a(n) = 2^((3*n-1)/2-1)*(2^((3*n-1)/2) + 2^((n-1)/2) + 3) if n is odd.
G.f.: (1-6*x-24*x^2+120*x^3)/((1-4*x)*(1-8*x)*(1-8*x^2)). [Bruno Berselli, May 17 2013]
MATHEMATICA
LinearRecurrence[{12, -24, -96, 256}, {1, 6, 24, 168}, 20] (* Bruno Berselli, May 17 2013 *)
CoefficientList[Series[(1 - 6 x - 24 x^2 + 120 x^3) / ((1 - 4 x) (1 - 8 x) (1 - 8 x^2)), {x, 0, 40}], x] (* Vincenzo Librandi, Sep 04 2013 *)
PROG
(Magma) I:=[1, 6, 24, 168]; [n le 4 select I[n] else 12*Self(n-1)-24*Self(n-2)-96*Self(n-3)+256*Self(n-4): n in [1..30]]; // Vincenzo Librandi, Sep 04 2013
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Yosu Yurramendi, May 16 2013
EXTENSIONS
More terms from Vincenzo Librandi, Sep 04 2013
STATUS
approved