OFFSET
0,3
COMMENTS
Partial sums of A131476.
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Mircea Merca, Inequalities and Identities Involving Sums of Integer Functions J. Integer Sequences, Vol. 14 (2011), Article 11.9.1.
Index entries for linear recurrences with constant coefficients, signature (4,-6,5,-5,6,-4,1).
FORMULA
a(n) = Sum_{k=0..n} floor(k^3/3).
a(n) = round((n^4 + 2*n^3 + n^2 - 4*n)/12).
a(n) = round((n^4 + 2*n^3 + n^2 - 4*n - 2)/12).
a(n) = floor((n^4 + 2*n^3 + n^2 - 4*n)/12).
a(n) = ceiling((n+1)*(n^3 + n^2 - 4)/12).
a(n) = a(n-3) + n^3 - 3*n^2 + 5*n - 4, n > 2.
From R. J. Mathar, Nov 26 2010: (Start)
G.f.: x^2*(2 + 3*x + x^3) / ( (1+x+x^2)*(1-x)^5 ).
a(n) = n^4/12 + n^3/6 + n^2/12 - n/3 - 1/9 + A061347(n+1)/9. (End)
EXAMPLE
a(4) = floor(1/3) + floor(8/3) + floor(27/3) + floor(64/3) = 32.
MAPLE
A061347 := proc(n) op(1+(n mod 3), [-2, 1, 1]) ; end proc:
# program replaced by a structured version by R. J. Mathar, Nov 26 2010
MATHEMATICA
Table[Sum[Floor[k^3/3], {k, 0, n}], {n, 0, 60}] (* G. C. Greubel, Nov 23 2016 *)
Accumulate[Table[Floor[n^3/3], {n, 0, 60}]] (* or *) LinearRecurrence[{4, -6, 5, -5, 6, -4, 1}, {0, 0, 2, 11, 32, 73, 145}, 60] (* Harvey P. Dale, May 29 2018 *)
PROG
(Magma) [Floor((n^4+2*n^3+n^2-4*n)/12): n in [0..60]]; // Vincenzo Librandi, May 08 2011
(PARI) a(n)=(n^4+2*n^3+n^2-4*n)\12 \\ Charles R Greathouse IV, May 08 2011
(Sage) [floor(n*(n^3 +2*n^2 +n -4)/12) for n in (0..60)] # G. C. Greubel, Jul 02 2019
(Python)
def A173707(n): return n*(n*(n*(n + 2) + 1) - 4)//12 # Chai Wah Wu, Feb 02 2023
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Mircea Merca, Nov 25 2010
STATUS
approved