OFFSET
1,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (8,-28,56,-70,56,-28,8,-1).
FORMULA
a(1)=1; a(n) = Sum_{i=n(n-1)/2+1..n(n-1)/2+n} i^3. [Corrected by Stefano Spezia, Jun 22 2024]
a(n) = (n^7 + 4n^5 + 3n^3)/8. - Charles R Greathouse IV, Sep 17 2009
G.f.: x*(1+27*x+153*x^2+268*x^3+153*x^4+27*x^5+x^6)/(1-x)^8. - Colin Barker, May 25 2012
a(n) = n^3*(n^2 + 1)*(n^2 + 3)/8 = A000578(n)*A002522(n)*A117950(n)/8. - Philippe Deléham, Mar 09 2014
E.g.f.: exp(x)*x*(8 + 132*x + 404*x^2 + 390*x^3 + 144*x^4 + 21*x^5 + x^6)/8. - Stefano Spezia, Jun 22 2024
EXAMPLE
s=3; a(1) = 1^s = 1; a(2) = 2^s + 3^s = 2^3+3^3 = 35; a(3) = 4^s + 5^s + 6^s = 64 + 125 + 216 = 405.
a(1) = 1*2*3/8 = 1;
a(2) = 8*5*7/8 = 35;
a(3) = 27*10*12/8 = 405;
a(4) = 64*17*19/8 = 2584;
a(5) = 125*26*28/8 = 11375; etc. - Philippe Deléham, Mar 09 2014
MAPLE
MATHEMATICA
i1 := n(n-1)/2+1; i2 := n(n-1)/2+n; s=3; Table[Sum[i^s, {i, i1, i2}], {n, 20}]
CoefficientList[Series[(1 + 27 x + 153 x^2 + 268 x^3 + 153 x^4 + 27 x^5 + x^6)/(1 - x)^8, {x, 0, 40}], x](* Vincenzo Librandi, Mar 11 2014 *)
With[{nn=30}, Total/@TakeList[Range[(nn(nn+1))/2]^3, Range[nn]]] (* Requires Mathematica version 11 or later *) (* or *) LinearRecurrence[{8, -28, 56, -70, 56, -28, 8, -1}, {1, 35, 405, 2584, 11375, 38961, 111475, 278720}, 30] (* Harvey P. Dale, Jun 05 2021 *)
PROG
(Magma) [(n^7+4*n^5+3*n^3)/8: n in [1..30]]; // Vincenzo Librandi, Mar 11 2014
(PARI) a(n)=(n^7+4*n^5+3*n^3)/8 \\ Charles R Greathouse IV, Oct 07 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Zak Seidov, Sep 24 2002
EXTENSIONS
Formula from Charles R Greathouse IV, Sep 17 2009
More terms from Vincenzo Librandi, Mar 11 2014
STATUS
approved