OFFSET
0,1
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..2000
Index entries for linear recurrences with constant coefficients, signature (4,-6,4,-1).
FORMULA
a(n) = 2*(n^3 +n^2 +n -1).
G.f.: 2*(-1 +6*x -x^2 +2*x^3)/(1-x)^4.
E.g.f.: 2*(-1 + 3*x + 4*x^2 + x^3)*exp(x). - G. C. Greubel, Mar 25 2021
MAPLE
seq( 2*(n^3 +n^2 +n -1), n=0..40); # G. C. Greubel, Mar 25 2021
MATHEMATICA
Table[-2 +2n +2n^2 +2n^3, {n, 0, 30}]
LinearRecurrence[{4, -6, 4, -1}, {-2, 4, 26, 76}, 40] (* Harvey P. Dale, Jun 06 2014 *)
PROG
(Magma) [2*(n^3+n^2+n-1): n in [0..40] ]; // Vincenzo Librandi, May 23 2011
(Sage) [2*(n^3 +n^2 +n -1) for n in (0..40)] # G. C. Greubel, Mar 25 2021
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Roger L. Bagula, Jan 20 2009
STATUS
approved