login
Sum of all aliquot divisors of all positive integers <= n.
31

%I #80 Oct 22 2023 00:39:37

%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 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

%C Apart from the symmetric representation of a(n) given in the Example section we have that a(n) can be represented with an arrowhead-shaped polygon formed by two zig-zag paths and the Dyck path described in the n-th row of A237593 as shown in the Links section. - _Omar E. Pol_, Jun 13 2022

%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.

%H Omar E. Pol, <a href="/A153485/a153485.jpg">Illustration of initial terms with arrowhead-shaped polygons</a>

%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

%F a(n) = A000290(n) - A000217(n) - A004125(n). - _Omar E. Pol_, Feb 26 2021

%F a(n) = A244048(n+1). - _Omar E. Pol_, Mar 28 2021

%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.

%e From _Omar E. Pol_, Mar 27 2021: (Start)

%e The following diagrams show a square dissection into regions that are the symmetric representation of A000203, A004125, A244048 and this sequence.

%e In order to construct every diagram we use the following rules:

%e At stage 1 in the first quadrant of the square grid we draw the symmetric representation of sigma(n) using the two Dyck paths described in the rows n and n-1 of A237593.

%e At stage 2 we draw a pair of orthogonal line segments (if it's necessary) such that in the drawing appears totally formed a square n X n. The area of the region that is above the symmetric representation of sigma(n) equals A004125(n).

%e At stage 3 we draw a zig-zag path with line segments of length 1 from (0,n-1) to (n-1,0) such that appears a staircase with n-1 steps. The area of the region (or regions) that is below the symmetric representation of sigma(n) and above the staircase equals A244048(n).

%e At stage 4 we draw a copy of the symmetric representation of A004125(n) rotated 180 degrees such that one of its vertices is the point (0,0). a(n) is the area of the region (or regions) that is above of this region and below the staircase.

%e Illustration for n = 1..6:

%e . _ _ _ _ _ _

%e . _ _ _ _ _ |_ _ _ |_ R|

%e . _ _ _ _ R |_ _S_| R| | |_T | S |_|

%e . _ _ _ R |_ _ |_| | |_ |_ _| | |_|_ _ |

%e . _ _ |_S_|_| | |_|_S | |_U_|_T | | |_ U |_T | |

%e . _ S |_ S| U|_|_|S| |_ U|_| | | | |_|S| | |_ |_| |

%e . |_| |_|_| |_|_|_| |_|_ _|_| |_V_|_U_|_| |_V_|_ _ _|_|

%e . U V U V

%e .

%e n: 1 2 3 4 5 6

%e R: A004125 0 0 1 1 4 3

%e S: A000203 1 3 4 7 6 12

%e T: A244048 0 0 1 2 5 6

%e U: a(n) 0 1 2 5 6 12

%e V: A004125 0 0 1 1 4 3

%e .

%e Illustration for n = 7..9:

%e . _ _ _ _ _ _ _ _ _

%e . _ _ _ _ _ _ _ _ |_ _ _S_ _| |

%e . _ _ _ _ _ _ _ |_ _ _ _ | | | |_ |_ _ R |

%e . |_ _S_ _| | | |_ | |_ R | | |_ |_ S| |

%e . | |_ |_ R | | |_ |_S |_ _| | |_ T |_|_ _|

%e . | |_ T |_ _| | |_T |_ _ | |_ _ |_ | |

%e . |_ _ |_ | | |_ _ U |_ | | | | U |_ | |

%e . | |_U |_ |S| | |_ |_ | | | |_ _ |_ |S|

%e . | V | |_| | | V | |_| | | V | |_| |

%e . |_ _ _|_ _ _|_| |_ _ _|_ _ _ _|_| |_ _ _ _|_ _ _ _|_|

%e .

%e n: 7 8 9

%e R: A004125 8 8 12

%e S: A000203 8 15 12

%e T: A244048 12 13 20

%e U: a(n) 13 20 24

%e V: A004125 8 8 12

%e .

%e Illustration for n = 10..12:

%e . _ _ _ _ _ _ _ _ _ _ _ _

%e . _ _ _ _ _ _ _ _ _ _ _ |_ _ _ _ _ _ | |

%e . _ _ _ _ _ _ _ _ _ _ |_ _ _S_ _ _| | | |_ | |_ _ R |

%e . |_ _ _S_ _ | | | |_ | R | | |_ | |_ |

%e . | |_ | |_ R | | |_ |_ | | |_ |_ S | |

%e . | |_ |_ _|_ | | |_ |_ | | |_ |_ |_ _|

%e . | |_ | |_ _| | |_ T |_ _ _| | |_ T |_ _ _ |

%e . | |_ T |_ _ | |_ _ _ |_ | | |_ _ |_ | |

%e . |_ _ |_ | | | |_ U |_ | | | | U |_ | |

%e . | |_ U |_ |S| | |_ |_ |S| | |_ |_ | |

%e . | |_ |_ | | | | |_ | | | |_ _ |_ | |

%e . | V | |_| | | V | |_| | | V | |_| |

%e . |_ _ _ _|_ _ _ _ _|_| |_ _ _ _ _|_ _ _ _ _|_| |_ _ _ _ _|_ _ _ _ _ _|_|

%e .

%e n: 10 11 12

%e R: A004125 13 22 17

%e S: A000203 18 12 28

%e T: A244048 24 32 33

%e U: a(n) 32 33 49

%e V: A004125 13 22 17

%e .

%e Note that in the diagrams the symmetric representation of A244048(n+1) is the same as the symmetric representation of a(n) rotated 180 degrees.

%e The diagrams for n = 11 and n = 12 both are copies from the diagrams that are in A244048 dated Jun 24 2014.

%e [Another way for the illustration of this sequence which is visible in the pyramid described in A245092 will be added soon.]

%e (End)

%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

%o (Python)

%o from math import isqrt

%o def A153485(n): return (-n*(n+1)-(s:=isqrt(n))**2*(s+1) + sum((q:=n//k)*((k<<1)+q+1) for k in range(1,s+1)))>>1 # _Chai Wah Wu_, Oct 21 2023

%Y Partial sums of A001065.

%Y Cf. A000027, A000203, A000217, A000290, A004125, A024916, A048050, A196020, A236104, A237593, A244048, A244049, A245092, A262626.

%K easy,nonn

%O 1,3

%A _Omar E. Pol_, Dec 27 2008

%E Better name from _Omar E. Pol_, Jan 28 2014, Jun 23 2014