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,-2,-4,2)
FORMULA
a(n) = 4*a(n-1) - 2*a(n-2) - 4*a(n-3) + 2*a(n-4). - Vincenzo Librandi, Jun 20 2012
MATHEMATICA
LinearRecurrence[{4, -2, -4, 2}, {1, 4, 14, 44}, 40] (* Vincenzo Librandi, Jun 20 2012 *)
PROG
(Magma) I:=[1, 4, 14, 44]; [n le 4 select I[n] else 4*Self(n-1)-2*Self(n-2)-4*Self(n-3)+2*Self(n-4): n in [1..40]]; // Vincenzo Librandi, Jun 20 2012
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved