login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A354801
n^2 minus the sum of all aliquot divisors of all positive integers <= n.
2
1, 3, 7, 11, 19, 24, 36, 44, 57, 68, 88, 95, 119, 136, 156, 172, 204, 218, 254, 271, 301, 330, 374, 385, 428, 463, 503, 530, 586, 603, 663, 695, 745, 792, 848, 864, 936, 989, 1049, 1078, 1158, 1187, 1271, 1318, 1374, 1439, 1531, 1550, 1639, 1695, 1775, 1832, 1936, 1977, 2069, 2116
OFFSET
1,2
COMMENTS
After the Dyck paths described in A237593 we can see that a(n) has a symmetric representation as follows: a(n) is the sum of the areas of two polygons. In the fourth quadrant of the infinite square grid the first polygon has a vertex at (0,0) and its area is equal to A000217(n). The second polygon appears if n >= 3 and it has a vertex at (n,-n) and its area is equal to A004125(n). So the area of the arrowhead-shaped polygon is equal to A153485(n). See the illustration of initial terms in the Links section.
FORMULA
a(n) = A000217(n) + A004125(n).
a(n) = A000290(n) - A153485(n).
a(n) = A024916(n) + A004125(n) - A153485(n).
MATHEMATICA
Accumulate[Table[3*n - 1 - DivisorSigma[1, n], {n, 1, 60}]] (* Amiram Eldar, Jun 12 2022 *)
PROG
(PARI) a(n) = n^2 - sum(k=1, n, sigma(k)-k); \\ Michel Marcus, Jun 13 2022
(Python)
from math import isqrt
def A354801(n): return n*(3*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 22 2023
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Omar E. Pol, Jun 06 2022
STATUS
approved