OFFSET
0,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (5,-10,10,-5,1).
FORMULA
G.f.: 2*(x + 11*x^2 + 11*x^3 + x^4)/(1 - x)^5.
a(n) = 5*a(n-1)-10*a(n-2)+10*a(n-3)-5*a(n-4)+a(n-5) for n>4.
MATHEMATICA
Table[2 n^4, {n, 0, 40}] (* or *) CoefficientList[Series[2(x + 11 x^2 + 11 x^3 + x^4)/(1 - x)^5, {x, 0, 40}], x]
LinearRecurrence[{5, -10, 10, -5, 1}, {0, 2, 32, 162, 512}, 40] (* Harvey P. Dale, Jun 17 2022 *)
PROG
(Magma) [2*n^4: n in [0..40]] /* or */ I:=[0, 2, 32, 162, 512]; [n le 5 select I[n] else 5*Self(n-1)-10*Self(n-2)+10*Self(n-3)-5*Self(n-4)+Self(n-5): n in [1..40]];
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Vincenzo Librandi, Jul 05 2014
STATUS
approved