OFFSET
1,2
LINKS
Seiichi Manyama, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = Sum_{k=1..n} k^2 * Sum_{d|k} (d^3 - (d - 1)^3)/d^2.
G.f.: (1/(1 - x)) * Sum_{k>=1} (k^3 - (k - 1)^3) * x^k * (1 + x^k)/(1 - x^k)^3.
From Vaclav Kotesovec, Aug 03 2022: (Start)
a(n) ~ n^3 * (log(n) + 2*gamma + (zeta(3) - 1)/3 - Pi^2/6), where gamma is the Euler-Mascheroni constant A001620. (End)
MATHEMATICA
Accumulate[Table[DivisorSigma[2, k] - 3*k*DivisorSigma[1, k] + 3*k^2*DivisorSigma[0, k], {k, 1, 50}]] (* Vaclav Kotesovec, Dec 17 2021 *)
PROG
(PARI) a(n) = sum(k=1, n, k^2*(n\k)^3);
(PARI) a(n) = sum(k=1, n, k^2*sumdiv(k, d, (d^3-(d-1)^3)/d^2));
(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^k)^3)/(1-x))
(Python)
from math import isqrt
def A350124(n): return (-(s:=isqrt(n))**4*(s+1)*(2*s+1) + sum((q:=n//k)*(k*(3*(k-1))+q*(k*(9*(k-1))+q*(k*(12*k-6)+2)+3)+1) for k in range(1, s+1)))//6 # Chai Wah Wu, Oct 21 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
Seiichi Manyama, Dec 15 2021
STATUS
approved