login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A350108
a(n) = Sum_{k=1..n} k * floor(n/k)^3.
3
1, 10, 32, 87, 153, 309, 443, 722, 1005, 1443, 1785, 2605, 3087, 3951, 4875, 6154, 6988, 8809, 9855, 12057, 13853, 16001, 17543, 21347, 23478, 26484, 29440, 33696, 36162, 41994, 44816, 50351, 54755, 59909, 64577, 73524, 77558, 84002, 90142, 100072, 105034
OFFSET
1,2
LINKS
FORMULA
a(n) = Sum_{k=1..n} k * Sum_{d|k} (d^3 - (d - 1)^3)/d.
G.f.: (1/(1 - x)) * Sum_{k>=1} (k^3 - (k - 1)^3) * x^k/(1 - x^k)^2.
From Vaclav Kotesovec, Aug 03 2022: (Start)
a(n) = A024916(n) + 3*A143128(n) - 3*A143127(n).
a(n) ~ Pi^2*n^3/6 - 3*n^2*log(n)/2. (End)
MATHEMATICA
a[n_] := Sum[k * Floor[n/k]^3, {k, 1, n}]; Array[a, 40] (* Amiram Eldar, Dec 14 2021 *)
Accumulate[Table[(1 + 3*k)*DivisorSigma[1, k] - 3*k*DivisorSigma[0, k], {k, 1, 50}]] (* Vaclav Kotesovec, Dec 16 2021 *)
PROG
(PARI) a(n) = sum(k=1, n, k*(n\k)^3);
(PARI) a(n) = sum(k=1, n, k*sumdiv(k, d, (d^3-(d-1)^3)/d));
(PARI) my(N=66, x='x+O('x^N)); Vec(sum(k=1, N, (k^3-(k-1)^3)*x^k/(1-x^k)^2)/(1-x))
(Python)
from math import isqrt
def A350108(n): return -(s:=isqrt(n))**4*(s+1)+sum((q:=n//k)*(k**2*(3*(q+1))+k*(q*((q<<1)-3)-3)+q+1) for k in range(1, s+1))>>1 # Chai Wah Wu, Oct 31 2023
CROSSREFS
Column 3 of A350106.
Sequence in context: A202804 A155192 A229720 * A024933 A198646 A356277
KEYWORD
nonn
AUTHOR
Seiichi Manyama, Dec 14 2021
STATUS
approved