This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A143127 #102 Apr 09 2025 04:20:45 %S A143127 1,5,11,23,33,57,71,103,130,170,192,264,290,346,406,486,520,628,666, %T A143127 786,870,958,1004,1196,1271,1375,1483,1651,1709,1949,2011,2203,2335, %U A143127 2471,2611,2935,3009,3161,3317,3637,3719,4055,4141,4405,4675,4859,4953,5433 %N A143127 a(n) = Sum_{k=1..n} k*d(k) where d(k) is the number of divisors of k. %C A143127 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 %C A143127 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 %H A143127 Enrique Pérez Herrero, <a href="/A143127/b143127.txt">Table of n, a(n) for n = 1..1000</a> %H A143127 Jacob F. F. Bulmer, Javier Martínez-Cifuentes, Bryn A. Bell, and Nicolás Quesada, <a href="https://arxiv.org/abs/2412.17742">Simulating lossy and partially distinguishable quantum optical circuits: theory, algorithms and applications to experiment validation and state preparation</a>, arXiv:2412.17742 [quant-ph], 2024. See p. 29. %H A143127 Vaclav Kotesovec, <a href="/A143127/a143127.jpg">Graph - The asymptotic ratio (1000000 terms)</a> %F A143127 a(n) = Sum_{k=1..n} A038040(k). %F A143127 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 %F A143127 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] %F A143127 a(n) = Sum_{k=1..n} k/2 * floor(n/k) * floor(1 + n/k). - _Daniel Suteu_, May 28 2018 %F A143127 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 %F A143127 From _Daniel Hoying_, May 21 2020: (Start) %F A143127 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; %F A143127 = (Sum_{i=1..floor(sqrt(n))} i*floor(n/i)*(1+floor(n/i))) - A000537(floor(sqrt(n))). %F A143127 a(n) = A000537(floor(sqrt(n))) ; n=1; %F A143127 = A000537(floor(sqrt(n))) + n*(n+1) - floor(n/2)*(floor(n/2)+1) ; 1<n<6; %F A143127 = 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) %F A143127 a(n) = Sum_{i=1..n} A018804(i)*floor(n/i). - _Ridouane Oudra_, Mar 15 2021 %F A143127 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 %e A143127 a(3) = 11 = (1 + 4 + 6), where n*d(n) = (1, 4, 6, 12, 10, 24, ...). %e A143127 a(4) = 23 = (8 + 7 + 5 + 3), where (8, 7, 5, 3) = row 4 of triangle A110661. %e A143127 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 %e A143127 a(4) = [1] + [2 + 1 + 1] + [3 + 1 + 1 + 1] + [4 + 2 + 2 + 1 + 1 + 1 + 1] = 23. - _Omar E. Pol_, Oct 18 2021 %t A143127 Accumulate[DivisorSigma[0, Range[48]] Range[48]] (* _Giovanni Resta_, May 29 2018 *) %o A143127 (Haskell) %o A143127 a143127 n = a143127_list !! (n-1) %o A143127 a143127_list = scanl1 (+) a038040_list %o A143127 -- _Reinhard Zumkeller_, Jan 21 2014 %o A143127 (PARI) a(n) = sum(k=1, n, k*numdiv(k)); \\ _Michel Marcus_, May 29 2018 %o A143127 (Python) %o A143127 from math import isqrt %o A143127 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 %Y A143127 Partial sums of A038040. %Y A143127 Cf. A000005, A083356. %Y A143127 Row sums of triangle A110661. %Y A143127 Row sums of triangle A143310. - _Gary W. Adamson_, Aug 06 2008 %Y A143127 Cf. A018804. %K A143127 nonn,easy %O A143127 1,2 %A A143127 _Gary W. Adamson_, Jul 26 2008 %E A143127 More terms from _Carl Najafi_, Dec 24 2011 %E A143127 Edited by _Max Alekseyev_, Jan 31 2012