login
A140322
a(n) = -1/6 + (-1)^n/2 + 2*4^n/3.
2
1, 2, 11, 42, 171, 682, 2731, 10922, 43691, 174762, 699051, 2796202, 11184811, 44739242, 178956971, 715827882, 2863311531, 11453246122, 45812984491, 183251937962, 733007751851, 2932031007402, 11728124029611, 46912496118442, 187649984473771, 750599937895082
OFFSET
0,2
COMMENTS
a(n+1) - 4a(n)= period 2: repeat -2, 3.
FORMULA
a(n) = 4*a(n-1) + a(n-2) - 4*a(n-3).
G.f.: ( 1 - 2*x + 2*x^2 ) / ( (x-1)*(4*x-1)*(1+x) ). - R. J. Mathar, Nov 21 2011
MATHEMATICA
LinearRecurrence[{4, 1, -4}, {1, 2, 11}, 30] (* Harvey P. Dale, Sep 17 2013 *)
PROG
(Magma) [-1/6+(1/2)*(-1)^n+(2/3)*4^n: n in [0..25]]; // Vincenzo Librandi, Aug 09 2011
CROSSREFS
Sequence in context: A079808 A089658 A219100 * A027247 A141190 A048500
KEYWORD
nonn,easy
AUTHOR
Paul Curtz, May 26 2008
STATUS
approved