OFFSET
1,2
LINKS
Index entries for linear recurrences with constant coefficients, signature (3,-3,1,1,-3,3,-1).
FORMULA
a(n) = floor((1/n)*(Sum_{i=1..n} i^3)) = floor(n*(n+1)^2/4).
G.f.: x*(1+x+x^4+3*x^2) / ( (1+x)*(x^2+1)*(x-1)^4 ). - R. J. Mathar, Feb 20 2011
EXAMPLE
a(3) = floor((1 + 8 + 27)/3) = 12.
MAPLE
ZL:=n->sum(i^3, i=1..n): a:=n->floor(numer(ZL(n))/n): seq(a(n), n=1..44); # Zerinvary Lajos, Mar 28 2007
MATHEMATICA
s = 0; a = {}; For[i = 1, i <= 100, i++, s = s + i^3; a = Append[a, Floor[(1/i) s]]]; a
PROG
(PARI) a(n)=n*(n^2+2*n+1)\4 \\ Charles R Greathouse IV, Oct 07 2015
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Joseph L. Pe, Dec 10 2002
STATUS
approved