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.
LINKS
FORMULA
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