OFFSET
1,1
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (4,0,0,1,-4).
FORMULA
G.f.: x*(2+x+3*x^2) / ( (x-1)*(4*x-1)*(1+x)*(x^2+1) ). - R. J. Mathar, Nov 21 2011
a(n) = 4*a(n-1) + a(n-4) - 4*a(n-5). - Vincenzo Librandi, Jun 17 2012
MATHEMATICA
With[{c=PadLeft[{}, 24, {2, 1, 3, 0}]}, Table[FromDigits[Take[c, n], 4], {n, 24}]] (* Harvey P. Dale, Oct 03 2011 *)
LinearRecurrence[{4, 0, 0, 1, -4}, {2, 9, 39, 156, 626}, 30] (* Vincenzo Librandi, Jun 17 2012 *)
PROG
(Magma)I:=[2, 9, 39, 156, 626]; [n le 5 select I[n] else 4*Self(n-1)+Self(n-4)-4*Self(n-5): n in [1..30]]; // Vincenzo Librandi, Jun 17 2012
CROSSREFS
KEYWORD
nonn,base
AUTHOR
STATUS
approved