OFFSET
0,2
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (6,-15,20,-15,6,-1).
FORMULA
a(n) = (n^5+15*n^3+14*n+30)/30 = (n+1)*(n^4-n^3+16*n^2-16*n+30)/30.
From G. C. Greubel, Dec 24 2022: (Start)
G.f.: (1 - 4*x + 10*x^2 - 8*x^3 + 5*x^4)/(1-x)^6.
E.g.f.: (1/30)*(30 +30*x +60*x^2 +40*x^3 +10*x^4 +x^5)*exp(x). (End)
MATHEMATICA
Table[(n+1)*(n*(n-1)*(n^2+16)+30)/30, {n, 0, 40}] (* G. C. Greubel, Dec 24 2022 *)
LinearRecurrence[{6, -15, 20, -15, 6, -1}, {1, 2, 7, 24, 69, 170}, 40] (* Harvey P. Dale, Jan 25 2024 *)
PROG
(PARI) a(n) = (n^5+15*n^3+14*n+30)/30; \\ Michel Marcus, Jan 22 2016
(Magma) [(n+1)*(n*(n-1)*(n^2+16)+30)/30: n in [0..40]]; // G. C. Greubel, Dec 24 2022
(SageMath) [(n+1)*(n*(n-1)*(n^2+16)+30)/30 for n in range(41)] # G. C. Greubel, Dec 24 2022
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Paul Barry, Apr 03 2003
STATUS
approved