OFFSET
1,3
LINKS
Index entries for linear recurrences with constant coefficients, signature (1,4,-4,-6,6,4,-4,-1,1).
FORMULA
a(n) = Sum_{i=1..floor(n/2)} (n-i)^3.
From Bruno Berselli, Apr 23 2018: (Start)
G.f.: x*(1 + x + x^2)*(1 + 6*x + 16*x^2 + 6*x^3 + x^4)/((1 - x)^5*(1 + x)^4).
a(n) = (30*(n - 2)*(n + 1)*(n^2 - n + 2) + (2*n - 1)*(2*n^2 - 2*n - 1)*(-1)^n + 119)/128. Therefore:
a(n) = n^2*(3*n - 2)*(5*n - 6)/64 for n even;
a(n) = (n - 1)^2*(3*n - 1)*(5*n + 1)/64 for n odd. (End)
a(n) = a(n-1)+4*a(n-2)-4*a(n-3)-6*a(n-4)+6*a(n-5)+4*a(n-6)-4*a(n-7)-a(n-8)+a(n-9). - Wesley Ivan Hurt, Apr 23 2021
MATHEMATICA
Table[Sum[(n - i)^3, {i, Floor[n/2]}], {n, 50}]
PROG
(Magma) [0] cat [&+[(n-k)^3: k in [1..n div 2]]: n in [2..80]]; // Vincenzo Librandi, Apr 23 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Wesley Ivan Hurt, Apr 22 2018
STATUS
approved