OFFSET
1,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..10000
FORMULA
a(1)=1; a(n)=sum(i^s, {i, n(n-1)/2+1, n(n-1)/2+1+n}).
a(n) = (5n^19 + 105n^17 + 666n^15 + 1530n^13 + 689n^11 - 995n^9 + 304n^7 + 640n^5 - 384n^3)/2560.
G.f.: x*(x^18 +20175*x^17 +11889255*x^16 +1319968434*x^15 +48299442990*x^14 +752964012192*x^13 +5757432094050*x^12 +23468751060270*x^11 +53583908362248*x^10 +70362713036770*x^9 +53583908362248*x^8 +23468751060270*x^7 +5757432094050*x^6+752964012192*x^5 +48299442990*x^4 +1319968434*x^3 +11889255*x^2 +20175*x +1)/(x -1)^20. [Colin Barker, Sep 06 2012]
EXAMPLE
s=9; a(1) = 1^s = 1; a(2) = 2^s + 3^s = 2^9 + 3^9 = 20195; a(3) = 4^s + 5^s + 6^s = 12292965, a(4) = 7^s + 8^s + 9^s + 10^3 = 1561991824.
MATHEMATICA
i1 := n(n-1)/2+1; i2 := n(n-1)/2+n; s=9; Table[Sum[i^s, {i, i1, i2}], {n, 20}]
Total[#^9]&/@(Range[First[#]+1, Last[#]]&/@Partition[Accumulate[Range[ 0, 15]], 2, 1]) (* Harvey P. Dale, Oct 05 2011 *)
PROG
(Magma) [(5*n^19 + 105*n^17 + 666*n^15 + 1530*n^13 + 689*n^11 - 995*n^9 + 304*n^7 + 640*n^5 - 384*n^3)/2560 : n in [1..20]]; // Vincenzo Librandi, Oct 06 2011
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Zak Seidov, Sep 24 2002
EXTENSIONS
Formula from Charles R Greathouse IV, Sep 17 2009
STATUS
approved