%I
%S 0,1,2,5,6,12,13,20,24,32,33,49,50,60,69,84,85,106,107,129,140,154,
%T 155,191,197,213,226,254,255,297,298,329,344,364,377,432,433,455,472,
%U 522,523,577,578,618,651,677,678,754,762,805,826
%N Sum of all aliquot divisors of all positive integers <= n.
%C Partial sums of A001065.
%C a(n) is also the sum of first n terms of A000203, minus n-th triangular number.
%C n is prime if and only if a(n) - a(n-1) = 1. - _Omar E. Pol_, Dec 31 2012
%C Also the alternating row sums of A236540. - _Omar E. Pol_, Jun 23 2014
%C Sum of the areas of all x X z rectangles with x and y integers, x + y = n, x <= y and z = floor(y/x). - _Wesley Ivan Hurt_, Dec 21 2020
%H G. C. Greubel, <a href="/A153485/b153485.txt">Table of n, a(n) for n = 1..1000</a>
%H Timothy Hume, <a href="https://www.parabola.unsw.edu.au/2020-2029/volume-56-2020/issue-2/article/partial-sum-sequence-aliquot-sums">Partial sum of the sequence of aliquot sums</a>, Parabola (2020) Vol. 56, Issue 2.
%F a(n) = A024916(n) - A000217(n).
%F a(n) = A000217(n-1) - A004125(n). - _Omar E. Pol_, Jan 28 2014
%F a(n) = A000290(n) - A000203(n) - A024816(n) - A004125(n) = A024816(n+1) - A004125(n+1). - _Omar E. Pol_, Jun 23 2014
%F G.f.: (1/(1 - x))*Sum_{k>=1} k*x^(2*k)/(1 - x^k). - _Ilya Gutkovskiy_, Jan 22 2017
%F a(n) = Sum_{k=1..n} k * floor((n-k)/k). - _Wesley Ivan Hurt_, Apr 02 2017
%F a(n) ~ n^2 * (Pi^2/12 - 1/2). - _Vaclav Kotesovec_, Dec 21 2020
%e Assuming that a(1) = 0, for n = 6 the aliquot divisors of the first six positive integers are [0], [1], [1], [1, 2], [1], [1, 2, 3], so a(6) = 0 + 1 + 1 + 1 + 2 + 1 + 1 + 2 + 3 = 12.
%t f[n_] := Sum[ DivisorSigma[1, m] - m, {m, n}]; Array[f, 60] (* _Robert G. Wilson v_, Jun 30 2014 *)
%t Accumulate@ Table[DivisorSum[n, # &, # < n &], {n, 51}] (* or *)
%t Table[Sum[k Floor[(n - k)/k], {k, n}], {n, 51}] (* _Michael De Vlieger_, Apr 02 2017 *)
%o (PARI) a(n) = sum(k=1, n, sigma(k)-k); \\ _Michel Marcus_, Jan 22 2017
%Y Cf. A000027, A000203, A000217, A001065, A024916, A048050, A244049.
%K easy,nonn,changed
%O 1,3
%A _Omar E. Pol_, Dec 27 2008
%E Better name from _Omar E. Pol_, Jan 28 2014, Jun 23 2014
|