OFFSET
1,2
LINKS
Winston de Greef, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = Sum_{k=1..n} Sum_{d|k, k/d odd} d^3 - (d - 1)^3.
G.f.: (1/(1 - x)) * Sum_{k>=1} (k^3 - (k-1)^3) * x^k/(1 - x^(2*k)).
MATHEMATICA
a[n_] := Sum[Floor[n/(2*k - 1)]^3, {k, 1, n}]; Array[a, 50] (* Amiram Eldar, Dec 17 2021 *)
PROG
(PARI) a(n) = sum(k=1, n, (n\(2*k-1))^3);
(PARI) a(n) = sum(k=1, n, sumdiv(k, d, k/d%2*(d^3-(d-1)^3)));
(PARI) my(N=66, x='x+O('x^N)); Vec(sum(k=1, N, (k^3-(k-1)^3)*x^k/(1-x^(2*k)))/(1-x))
CROSSREFS
KEYWORD
nonn
AUTHOR
Seiichi Manyama, Dec 16 2021
STATUS
approved