A354801 n^2 minus the sum of all aliquot divisors of all positive integers <= n.
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
Links
- Omar E. Pol, Illustration of initial terms
Crossrefs
Programs
-
Mathematica
Accumulate[Table[3*n - 1 - DivisorSigma[1, n], {n, 1, 60}]] (* Amiram Eldar, Jun 12 2022 *)
-
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
Comments