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”).

a(n) = Sum_{k=1..n} k * floor(n/k)^3.
3

%I #30 Oct 31 2023 18:14:25

%S 1,10,32,87,153,309,443,722,1005,1443,1785,2605,3087,3951,4875,6154,

%T 6988,8809,9855,12057,13853,16001,17543,21347,23478,26484,29440,33696,

%U 36162,41994,44816,50351,54755,59909,64577,73524,77558,84002,90142,100072,105034

%N a(n) = Sum_{k=1..n} k * floor(n/k)^3.

%H Seiichi Manyama, <a href="/A350108/b350108.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) = Sum_{k=1..n} k * Sum_{d|k} (d^3 - (d - 1)^3)/d.

%F G.f.: (1/(1 - x)) * Sum_{k>=1} (k^3 - (k - 1)^3) * x^k/(1 - x^k)^2.

%F From _Vaclav Kotesovec_, Aug 03 2022: (Start)

%F a(n) = A024916(n) + 3*A143128(n) - 3*A143127(n).

%F a(n) ~ Pi^2*n^3/6 - 3*n^2*log(n)/2. (End)

%t a[n_] := Sum[k * Floor[n/k]^3, {k, 1, n}]; Array[a, 40] (* _Amiram Eldar_, Dec 14 2021 *)

%t Accumulate[Table[(1 + 3*k)*DivisorSigma[1, k] - 3*k*DivisorSigma[0, k], {k, 1, 50}]] (* _Vaclav Kotesovec_, Dec 16 2021 *)

%o (PARI) a(n) = sum(k=1, n, k*(n\k)^3);

%o (PARI) a(n) = sum(k=1, n, k*sumdiv(k, d, (d^3-(d-1)^3)/d));

%o (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))

%o (Python)

%o from math import isqrt

%o 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

%Y Column 3 of A350106.

%Y Cf. A024916, A143128, A143127, A318742.

%K nonn

%O 1,2

%A _Seiichi Manyama_, Dec 14 2021