The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A350123 a(n) = Sum_{k=1..n} k^2 * floor(n/k)^2. 6
1, 8, 22, 57, 91, 185, 247, 402, 545, 775, 917, 1379, 1573, 1995, 2455, 3106, 3428, 4377, 4775, 5909, 6753, 7727, 8301, 10331, 11230, 12564, 13904, 15990, 16888, 19908, 20930, 23597, 25545, 27767, 29827, 34468, 35910, 38660, 41328, 46318, 48080, 53644, 55578 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
FORMULA
a(n) = Sum_{k=1..n} k^2 * Sum_{d|k} (2*d - 1)/d^2 = Sum_{k=1..n} 2 * k * sigma(k) - sigma_2(k) = 2 * A143128(n) - A064602(n).
G.f.: (1/(1 - x)) * Sum_{k>=1} (2*k - 1) * x^k * (1 + x^k)/(1 - x^k)^3.
a(n) ~ n^3 * (Pi^2/9 - zeta(3)/3). - Vaclav Kotesovec, Dec 16 2021
MATHEMATICA
Accumulate[Table[2*k*DivisorSigma[1, k] - DivisorSigma[2, k], {k, 1, 50}]] (* Vaclav Kotesovec, Dec 16 2021 *)
PROG
(PARI) a(n) = sum(k=1, n, k^2*(n\k)^2);
(PARI) a(n) = sum(k=1, n, k^2*sumdiv(k, d, (2*d-1)/d^2));
(PARI) a(n) = sum(k=1, n, 2*k*sigma(k)-sigma(k, 2));
(PARI) my(N=66, x='x+O('x^N)); Vec(sum(k=1, N, (2*k-1)*x^k*(1+x^k)/(1-x^k)^3)/(1-x))
(Python)
from math import isqrt
def A350123(n): return (-(s:=isqrt(n))**3*(s+1)*((s<<1)+1)+sum((q:=n//k)*(6*k**2*q+((k<<1)-1)*(q+1)*((q<<1)+1)) for k in range(1, s+1)))//6 # Chai Wah Wu, Oct 24 2023
CROSSREFS
Sequence in context: A002968 A211530 A058404 * A211479 A318034 A326162
KEYWORD
nonn
AUTHOR
Seiichi Manyama, Dec 15 2021
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 6 08:35 EDT 2024. Contains 373119 sequences. (Running on oeis4.)