OFFSET
1,2
COMMENTS
a(n) = n+1 iff n is prime or n is the square of a prime (A000430). - Bernard Schott, Jan 29 2021
FORMULA
a(n) = Sum_{d|n} d * (1 - [d = n/d]), where [ ] is the Iverson bracket.
a(n) = sigma(n) - A037213(n). - David A. Corneth, Jan 30 2021
MATHEMATICA
Table[Sum[k*(1 - KroneckerDelta[k, n/k]) (1 - Ceiling[n/k] + Floor[n/k]), {k, n}], {n, 80}]
PROG
(PARI) a(n) = sumdiv(n, d, d*(d!=n/d)); \\ Michel Marcus, Jan 29 2021
(PARI) a(n) = sigma(n) - issquare(n)*sqrtint(n) \\ David A. Corneth, Jan 30 2021
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Wesley Ivan Hurt, Jan 28 2021
STATUS
approved