OFFSET
1,3
LINKS
Colin Barker, Table of n, a(n) for n = 1..1000
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-1)/2)} i^3 + (n-i)^3.
From David A. Corneth, Oct 27 2017: (Start)
For odd n, a(n) = binomial(n, 2)^2 = n^4/4 - n^3/2 + x^2/4.
For even n, a(n) = binomial(n, 2)^2 - n^3/8 = n^4/4 - 5*n^3/8 + x^2/4. (End)
G.f.: -x^3*(9 + 19*x + 36*x^2 + 22*x^3 + 9*x^4 + x^5) /(1+x)^4 /(x-1)^5. - R. J. Mathar, Nov 07 2017
From Colin Barker, Nov 21 2017: (Start)
a(n) = (1/16)*(n^2*(4 - (9 + (-1)^n)*n + 4*n^2)).
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) for n>9.
(End)
MATHEMATICA
Table[Sum[i^3 + (n - i)^3, {i, Floor[(n-1)/2]}], {n, 40}]
PROG
(PARI) first(n) = my(res = vector(n, i, binomial(i, 2)^2)); forstep(i=2, n, 2, res[i] -= i^3/8); res \\ David A. Corneth, Oct 27 2017
(PARI) a(n) = sum(i=1, (n-1)\2, i^3 + (n-i)^3); \\ Michel Marcus, Nov 19 2017
(PARI) concat(vector(2), Vec(x^3*(9 + 19*x + 36*x^2 + 22*x^3 + 9*x^4 + x^5) / ((1 - x)^5*(1 + x)^4) + O(x^40))) \\ Colin Barker, Nov 21 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Wesley Ivan Hurt, Oct 26 2017
STATUS
approved