OFFSET
0,3
COMMENTS
Binomial transform of 1, -6, 6, 0, 0, 0, (0 continued). - R. J. Mathar, Nov 29 2015
REFERENCES
Graham et al., Handbook of Combinatorics, Vol. 2, p. 1243.
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..780
Index entries for linear recurrences with constant coefficients, signature (4,-6,4,-1).
FORMULA
a(0)=1, a(1)=0, a(2)=5; for n>2, a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) + 6. - Gionata Neri, May 12 2015
From Robert Israel, May 12 2015: (Start)
O.g.f.: (1 - 4*x + 11*x^2 - 2*x^3)/(1-x)^4.
E.g.f.: (1 - x + 3*x^2 + x^3)*exp(x). (End)
MAPLE
[seq (1-2*n+n^3, n=0..60)]; # Zerinvary Lajos, May 28 2006
MATHEMATICA
Table[(n - 1) (n^2 + n - 1), {n, 0, 40}] (* Michael De Vlieger, May 12 2015 *)
LinearRecurrence[{4, -6, 4, -1}, {1, 0, 5, 22}, 50] (* Harvey P. Dale, Dec 28 2021 *)
PROG
(Magma) [(n-1)*(n^2+n-1): n in [0..40]]; // Vincenzo Librandi, Apr 27 2011
(PARI) vector(50, n, n--; (n-1)*(n^2+n-1)) \\ Anders Hellström, Nov 29 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved