login
A153485
Sum of all aliquot divisors of all positive integers <= n.
31
0, 1, 2, 5, 6, 12, 13, 20, 24, 32, 33, 49, 50, 60, 69, 84, 85, 106, 107, 129, 140, 154, 155, 191, 197, 213, 226, 254, 255, 297, 298, 329, 344, 364, 377, 432, 433, 455, 472, 522, 523, 577, 578, 618, 651, 677, 678, 754, 762, 805, 826
OFFSET
1,3
COMMENTS
a(n) is also the sum of first n terms of A000203, minus n-th triangular number.
n is prime if and only if a(n) - a(n-1) = 1. - Omar E. Pol, Dec 31 2012
Also the alternating row sums of A236540. - Omar E. Pol, Jun 23 2014
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
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
FORMULA
a(n) = A024916(n) - A000217(n).
a(n) = A000217(n-1) - A004125(n). - Omar E. Pol, Jan 28 2014
a(n) = A000290(n) - A000203(n) - A024816(n) - A004125(n) = A024816(n+1) - A004125(n+1). - Omar E. Pol, Jun 23 2014
G.f.: (1/(1 - x))*Sum_{k>=1} k*x^(2*k)/(1 - x^k). - Ilya Gutkovskiy, Jan 22 2017
a(n) = Sum_{k=1..n} k * floor((n-k)/k). - Wesley Ivan Hurt, Apr 02 2017
a(n) ~ n^2 * (Pi^2/12 - 1/2). - Vaclav Kotesovec, Dec 21 2020
a(n) = A000290(n) - A000217(n) - A004125(n). - Omar E. Pol, Feb 26 2021
a(n) = A244048(n+1). - Omar E. Pol, Mar 28 2021
EXAMPLE
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.
From Omar E. Pol, Mar 27 2021: (Start)
The following diagrams show a square dissection into regions that are the symmetric representation of A000203, A004125, A244048 and this sequence.
In order to construct every diagram we use the following rules:
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.
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).
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).
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.
Illustration for n = 1..6:
. _ _ _ _ _ _
. _ _ _ _ _ |_ _ _ |_ R|
. _ _ _ _ R |_ _S_| R| | |_T | S |_|
. _ _ _ R |_ _ |_| | |_ |_ _| | |_|_ _ |
. _ _ |_S_|_| | |_|_S | |_U_|_T | | |_ U |_T | |
. _ S |_ S| U|_|_|S| |_ U|_| | | | |_|S| | |_ |_| |
. |_| |_|_| |_|_|_| |_|_ _|_| |_V_|_U_|_| |_V_|_ _ _|_|
. U V U V
.
n: 1 2 3 4 5 6
R: A004125 0 0 1 1 4 3
S: A000203 1 3 4 7 6 12
T: A244048 0 0 1 2 5 6
U: a(n) 0 1 2 5 6 12
V: A004125 0 0 1 1 4 3
.
Illustration for n = 7..9:
. _ _ _ _ _ _ _ _ _
. _ _ _ _ _ _ _ _ |_ _ _S_ _| |
. _ _ _ _ _ _ _ |_ _ _ _ | | | |_ |_ _ R |
. |_ _S_ _| | | |_ | |_ R | | |_ |_ S| |
. | |_ |_ R | | |_ |_S |_ _| | |_ T |_|_ _|
. | |_ T |_ _| | |_T |_ _ | |_ _ |_ | |
. |_ _ |_ | | |_ _ U |_ | | | | U |_ | |
. | |_U |_ |S| | |_ |_ | | | |_ _ |_ |S|
. | V | |_| | | V | |_| | | V | |_| |
. |_ _ _|_ _ _|_| |_ _ _|_ _ _ _|_| |_ _ _ _|_ _ _ _|_|
.
n: 7 8 9
R: A004125 8 8 12
S: A000203 8 15 12
T: A244048 12 13 20
U: a(n) 13 20 24
V: A004125 8 8 12
.
Illustration for n = 10..12:
. _ _ _ _ _ _ _ _ _ _ _ _
. _ _ _ _ _ _ _ _ _ _ _ |_ _ _ _ _ _ | |
. _ _ _ _ _ _ _ _ _ _ |_ _ _S_ _ _| | | |_ | |_ _ R |
. |_ _ _S_ _ | | | |_ | R | | |_ | |_ |
. | |_ | |_ R | | |_ |_ | | |_ |_ S | |
. | |_ |_ _|_ | | |_ |_ | | |_ |_ |_ _|
. | |_ | |_ _| | |_ T |_ _ _| | |_ T |_ _ _ |
. | |_ T |_ _ | |_ _ _ |_ | | |_ _ |_ | |
. |_ _ |_ | | | |_ U |_ | | | | U |_ | |
. | |_ U |_ |S| | |_ |_ |S| | |_ |_ | |
. | |_ |_ | | | | |_ | | | |_ _ |_ | |
. | V | |_| | | V | |_| | | V | |_| |
. |_ _ _ _|_ _ _ _ _|_| |_ _ _ _ _|_ _ _ _ _|_| |_ _ _ _ _|_ _ _ _ _ _|_|
.
n: 10 11 12
R: A004125 13 22 17
S: A000203 18 12 28
T: A244048 24 32 33
U: a(n) 32 33 49
V: A004125 13 22 17
.
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.
The diagrams for n = 11 and n = 12 both are copies from the diagrams that are in A244048 dated Jun 24 2014.
[Another way for the illustration of this sequence which is visible in the pyramid described in A245092 will be added soon.]
(End)
MATHEMATICA
f[n_] := Sum[ DivisorSigma[1, m] - m, {m, n}]; Array[f, 60] (* Robert G. Wilson v, Jun 30 2014 *)
Accumulate@ Table[DivisorSum[n, # &, # < n &], {n, 51}] (* or *)
Table[Sum[k Floor[(n - k)/k], {k, n}], {n, 51}] (* Michael De Vlieger, Apr 02 2017 *)
PROG
(PARI) a(n) = sum(k=1, n, sigma(k)-k); \\ Michel Marcus, Jan 22 2017
(Python)
from math import isqrt
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
KEYWORD
easy,nonn
AUTHOR
Omar E. Pol, Dec 27 2008
EXTENSIONS
Better name from Omar E. Pol, Jan 28 2014, Jun 23 2014
STATUS
approved