A143127 a(n) = Sum_{k=1..n} k*d(k) where d(k) is the number of divisors of k.
1, 5, 11, 23, 33, 57, 71, 103, 130, 170, 192, 264, 290, 346, 406, 486, 520, 628, 666, 786, 870, 958, 1004, 1196, 1271, 1375, 1483, 1651, 1709, 1949, 2011, 2203, 2335, 2471, 2611, 2935, 3009, 3161, 3317, 3637, 3719, 4055, 4141, 4405, 4675, 4859, 4953, 5433
Offset: 1
Examples
a(3) = 11 = (1 + 4 + 6), where n*d(n) = (1, 4, 6, 12, 10, 24, ...). a(4) = 23 = (8 + 7 + 5 + 3), where (8, 7, 5, 3) = row 4 of triangle A110661. a(4) = 23 is the sum of [1 2 3 4|2 4|3|4] (multiples of k=1..4, not exceeding n). - _Wolfdieter Lang_, Oct 18 2021 a(4) = [1] + [2 + 1 + 1] + [3 + 1 + 1 + 1] + [4 + 2 + 2 + 1 + 1 + 1 + 1] = 23. - _Omar E. Pol_, Oct 18 2021
Links
- Enrique Pérez Herrero, Table of n, a(n) for n = 1..1000
- Jacob F. F. Bulmer, Javier Martínez-Cifuentes, Bryn A. Bell, and Nicolás Quesada, Simulating lossy and partially distinguishable quantum optical circuits: theory, algorithms and applications to experiment validation and state preparation, arXiv:2412.17742 [quant-ph], 2024. See p. 29.
- Vaclav Kotesovec, Graph - The asymptotic ratio (1000000 terms)
Crossrefs
Programs
-
Haskell
a143127 n = a143127_list !! (n-1) a143127_list = scanl1 (+) a038040_list -- Reinhard Zumkeller, Jan 21 2014
-
Mathematica
Accumulate[DivisorSigma[0, Range[48]] Range[48]] (* Giovanni Resta, May 29 2018 *)
-
PARI
a(n) = sum(k=1, n, k*numdiv(k)); \\ Michel Marcus, May 29 2018
-
Python
from math import isqrt def A143127(n): return -((k:=isqrt(n))*(k+1)>>1)**2+sum(i*(m:=n//i)*(1+m) for i in range(1,k+1)) # Chai Wah Wu, Jul 11 2023
Formula
a(n) = Sum_{k=1..n} A038040(k).
a(n) = Sum_{m=1..floor(sqrt(n))} m*(m+floor(n/m))*(floor(n/m)+1-m) - A000330(floor(sqrt(n))) = 2*A083356(n) - A000330(floor(sqrt(n))). - Max Alekseyev, Jan 31 2012
G.f.: x*f'(x)/(1 - x), where f(x) = Sum_{k>=1} x^k/(1 - x^k). - Ilya Gutkovskiy, Apr 13 2017 [Sum_{k>=1} k*x^k/((1-x)*(1-x^k)^2), see A038040. - Wolfdieter Lang, Oct 18 2021]
a(n) = Sum_{k=1..n} k/2 * floor(n/k) * floor(1 + n/k). - Daniel Suteu, May 28 2018
a(n) ~ log(n) * n^2 / 2 + (gamma - 1/4)*n^2, where gamma is the Euler-Mascheroni constant A001620. - Vaclav Kotesovec, Sep 08 2018
From Daniel Hoying, May 21 2020: (Start)
a(n) = (Sum_{i=1..floor(sqrt(n))} i*floor(n/i)*(1+floor(n/i))) - (floor(sqrt(n))*(1+floor(sqrt(n)))/2)^2;
= (Sum_{i=1..floor(sqrt(n))} i*floor(n/i)*(1+floor(n/i))) - A000537(floor(sqrt(n))).
a(n) = A000537(floor(sqrt(n))) ; n=1;
= A000537(floor(sqrt(n))) + n*(n+1) - floor(n/2)*(floor(n/2)+1) ; 1
= A000537(floor(sqrt(n))) + n*(n+1) - floor(n/2)*(floor(n/2)+1) + Sum_{i=floor(sqrt(n))+1..floor(n/2)} i*floor(n/i)*(1+floor(n/i)) ; n>=6. (End)
a(n) = Sum_{i=1..n} A018804(i)*floor(n/i). - Ridouane Oudra, Mar 15 2021
a(n) = Sum_{k=1..n} b(n,k), with b(n, k) = Sum_{j=1..floor(n/k)} j*k = k * floor(n/k) * (floor(n/k) + 1)/2. See the formula by Daniel Suteu above. - Wolfdieter Lang, Oct 18 2021
Extensions
More terms from Carl Najafi, Dec 24 2011
Edited by Max Alekseyev, Jan 31 2012
Comments