OFFSET
1,2
LINKS
Seiichi Manyama, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = Sum_{k=1..n} k^3 * Sum_{d|k} (1 - (1 - 1/d)^3).
G.f.: (1/(1 - x)) * Sum_{k>=1} (k^3 - (k - 1)^3) * x^k * (1 + 4*x^k + x^(2*k))/(1 - x^k)^4.
From Vaclav Kotesovec, Aug 02 2022: (Start)
a(n) ~ n^4 * (Pi^2/8 + Pi^4/360 - 3*zeta(3)/4). (End)
MATHEMATICA
a[n_] := Sum[(k * Floor[n/k])^3, {k, 1, n}]; Array[a, 40] (* Amiram Eldar, Jul 31 2022 *)
PROG
(PARI) a(n) = sum(k=1, n, (k*(n\k))^3);
(PARI) a(n) = sum(k=1, n, k^3*sumdiv(k, d, 1-(1-1/d)^3));
(PARI) my(N=40, x='x+O('x^N)); Vec(sum(k=1, N, (k^3-(k-1)^3)*x^k*(1+4*x^k+x^(2*k))/(1-x^k)^4)/(1-x))
(Python)
from math import isqrt
def A356249(n): return -(s:=isqrt(n))**5*(s+1)**2 + sum((q:=n//k)**2*(k*(3*(k-1))+q*(k*(k*(4*k+6)-6)+q*(k*(3*(k-1))+1)+2)+1) for k in range(1, s+1))>>2 # Chai Wah Wu, Oct 21 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
Seiichi Manyama, Jul 31 2022
STATUS
approved