login
A143127
a(n) = Sum_{k=1..n} k*d(k) where d(k) is the number of divisors of k.
18
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,2
COMMENTS
a(n) is also the sum of all parts of all partitions of all positive integers <= n into equal parts. - Omar E. Pol, May 29 2017
a(n) is also the sum of the multiples of k, not exceeding n, for k = 1, 2, ..., n. See a formula and an example below. - Wolfdieter Lang, Oct 18 2021
LINKS
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<n<6;
= 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 = floor(n/k) * floor(n/k) + 1)/2. See the formula by Daniel Suteu above. - Wolfdieter Lang, Oct 18 2021
EXAMPLE
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
MATHEMATICA
Accumulate[DivisorSigma[0, Range[48]] Range[48]] (* Giovanni Resta, May 29 2018 *)
PROG
(Haskell)
a143127 n = a143127_list !! (n-1)
a143127_list = scanl1 (+) a038040_list
-- Reinhard Zumkeller, Jan 21 2014
(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
CROSSREFS
Partial sums of A038040.
Row sums of triangle A110661.
Row sums of triangle A143310. - Gary W. Adamson, Aug 06 2008
Cf. A018804.
Sequence in context: A304372 A167610 A295149 * A235386 A061769 A169744
KEYWORD
nonn,easy
AUTHOR
Gary W. Adamson, Jul 26 2008
EXTENSIONS
More terms from Carl Najafi, Dec 24 2011
Edited by Max Alekseyev, Jan 31 2012
STATUS
approved