OFFSET
0,3
COMMENTS
This is the case d=8 in the identity n^2*(n+1)*(2*d*n-2*d+3)/6 - Sum_{k=0..n-1} k*(k+1)*(2*d*k - 2*d + 3)/6 = n*(n+1)*(3*d*n^2 - d*n + 4*n - 2*d + 2)/12. - Bruno Berselli, May 07 2010, Feb 26 2011
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
B. Berselli, A description of the recursive method in Comments lines: website Matem@ticamente (in Italian).
Index entries for linear recurrences with constant coefficients, signature (5,-10,10,-5,1).
FORMULA
a(n) = n*(n+1)*(12*n^2 - 2*n - 7)/6.
G.f.: x*(1 + 32*x + 15*x^2)/(1-x)^5. - Bruno Berselli, Feb 26 2011
E.g.f.: x*(6 + 105*x + 82*x^2 + 12*x^3)*exp(x)/6. - G. C. Greubel, Aug 30 2019
MAPLE
seq(n*(n+1)*(12*n^2 -2*n -7)/6, n=0..40); # G. C. Greubel, Aug 30 2019
MATHEMATICA
CoefficientList[Series[x(1+32x+15x^2)/(1-x)^5, {x, 0, 40}], x] (* Vincenzo Librandi, Jan 01 2014 *)
Table[n*(n+1)*(12*n^2 -2*n -7)/6, {n, 0, 40}] (* G. C. Greubel, Aug 30 2019 *)
PROG
(Magma) [(12*n^4+10*n^3-9*n^2-7*n)/6: n in [0..50]]; // Vincenzo Librandi, Jan 01 2014
(PARI) vector(40, n, n*(n-1)*(12*(n-1)^2 -2*n -5)/6) \\ G. C. Greubel, Aug 30 2019
(Sage) [n*(n+1)*(12*n^2 -2*n -7)/6 for n in (0..40)] # G. C. Greubel, Aug 30 2019
(GAP) List([0..40], n-> n*(n+1)*(12*n^2 -2*n -7)/6); G. C. Greubel, Aug 30 2019
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Vincenzo Librandi, Jan 25 2010
STATUS
approved