OFFSET
4,1
LINKS
G. C. Greubel, Table of n, a(n) for n = 4..1000
Index entries for linear recurrences with constant coefficients, signature (4,-6,4,-1).
FORMULA
a(n) = (n-3)*(n^2+6*n-10)/6, n>3.
G.f.: x^4*(5-5*x+x^2)/(1-x)^4. - R. J. Mathar, Mar 13 2016
E.g.f.: (-30 - 6*x + 3*x^2 + (30 - 24*x + 6*x^2 + x^3)*exp(x))/6. - G. C. Greubel, Jan 21 2020
MAPLE
seq( (n-3)*(n^2+6*n-10)/6, n=4..40); # G. C. Greubel, Jan 21 2020
MATHEMATICA
Table[(n-3)*(n^2+6*n-10)/6, {n, 4, 40}] (* G. C. Greubel, Jan 21 2020 *)
PROG
(PARI) a(n) = (n-3)*(n^2+6*n-10)/6; \\ G. C. Greubel, Jan 21 2020
(Magma) [(n-3)*(n^2+6*n-10)/6: n in [4..40]]; // G. C. Greubel, Jan 21 2020
(Sage) [(n-3)*(n^2+6*n-10)/6 for n in (4..40)] # G. C. Greubel, Jan 21 2020
(GAP) List([4..40], n-> (n-3)*(n^2+6*n-10)/6); # G. C. Greubel, Jan 21 2020
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, May 28 2000
STATUS
approved