OFFSET
1,2
LINKS
Seiichi Manyama, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = Sum_{k=1,..n} Sum_{d|k} (-1)^(k/d + 1) * (d^3 - (d - 1)^3).
G.f.: (1/(1 - x)) * Sum_{k>=1} (k^3 - (k - 1)^3) * x^k/(1 + x^k).
a(n) ~ 3*zeta(3)*n^3/4. - Vaclav Kotesovec, May 28 2021
MATHEMATICA
a[n_] := Sum[(-1)^(k + 1) * Quotient[n, k]^3, {k, 1, n}]; Array[a, 50] (* Amiram Eldar, May 27 2021 *)
Accumulate[Table[-3*DivisorSigma[0, n] + 2*DivisorSigma[0, 2*n] + 6*DivisorSigma[1, n] - 3*DivisorSigma[1, 2*n] - 9/2 * DivisorSigma[2, n] + 3/2 * DivisorSigma[2, 2*n], {n, 1, 50}]] (* Vaclav Kotesovec, May 28 2021 *)
PROG
(PARI) a(n) = sum(k=1, n, (-1)^(k+1)*(n\k)^3);
(PARI) a(n) = sum(k=1, n, sumdiv(k, d, (-1)^(k/d+1)*(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^k))/(1-x))
CROSSREFS
KEYWORD
nonn
AUTHOR
Seiichi Manyama, May 27 2021
STATUS
approved