OFFSET
2,1
LINKS
G. C. Greubel, Table of n, a(n) for n = 2..1000
Index entries for linear recurrences with constant coefficients, signature (4,-6,4,-1).
FORMULA
From Ralf Stephan, Feb 07 2004: (Start)
G.f.: x^2*(3 - 2*x)*(1 - x + x^2)/(1-x)^4.
Differences of A027966. (End)
From G. C. Greubel, Jun 30 2019: (Start)
a(n) = (18 - 10*n + 3*n^2 + n^3)/6.
E.g.f.: (-18 - 12*x + (18 - 6*x + 6*x^2 + x^3)*exp(x))/6. (End)
MATHEMATICA
LinearRecurrence[{4, -6, 4, -1}, {3, 7, 15, 28}, 50] (* G. C. Greubel, Jun 30 2019 *)
PROG
(PARI) vector(50, n, n++; (18-10*n+3*n^2+n^3)/6) \\ G. C. Greubel, Jun 30 2019
(Magma) [(18-10*n+3*n^2+n^3)/6: n in [2..50]]; // G. C. Greubel, Jun 30 2019
(Sage) [(18-10*n+3*n^2+n^3)/6 for n in (2..50)] # G. C. Greubel, Jun 30 2019
(GAP) List([2..50], n-> (18-10*n+3*n^2+n^3)/6) # G. C. Greubel, Jun 30 2019
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
EXTENSIONS
Terms a(32) onward added by G. C. Greubel, Jun 30 2019
STATUS
approved