OFFSET
0,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (4,0,1,-4)
FORMULA
G.f.: (-4x^3 - 2x^2 - x+1)/((1-4x)*(1-x^3)).
a(n) = 4*a(n-1) + a(n-3) - 4*a(n-4). - Vincenzo Librandi, Jun 22 2012
MATHEMATICA
LinearRecurrence[{4, 0, 1, -4}, {1, 3, 10, 37}, 40] (* Vincenzo Librandi, Jun 22 2012 *)
PROG
(Magma) I:=[1, 3, 10, 37]; [n le 4 select I[n] else 4*Self(n-1)+Self(n-3)-4*Self(n-4): n in [1..30]]; // Vincenzo Librandi, Jun 22 2012
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved