A076360 a(n) = d(sigma(n)) - sigma(d(n)), where d(n) is the number of divisors of n and sigma(n) is their sum.
0, -1, 0, -2, 1, -1, 1, -3, -2, -1, 3, -6, 1, 1, 1, -4, 3, -8, 3, -4, -1, 2, 5, -3, -2, 1, 1, -4, 5, -3, 3, -6, 3, 1, 3, -9, 1, 5, 1, -3, 5, -3, 3, 0, -4, 5, 7, -12, 0, -8, 5, -6, 5, 1, 5, 1, 3, 5, 9, -12, 1, 5, -4, -6, 5, 0, 3, 0, 5, 0, 9, -20, 1, 1, -6, 0, 5, 1, 7, -10, -3, 5, 9, -16, 5, 5, 9, 3, 9, -16, 3, 4, 1, 8, 9, -10, 3, -6, 0, -9, 5, 1, 5, 1, -1
Offset: 1
Links
- Amiram Eldar, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
d0[x_] := DivisorSigma[0, x] d1[x_] := DivisorSigma[1, x] Table[ d0[d1[w]] - d1[d0[w]], {w, 1, 128}]
-
PARI
a(n) = {my(f = factor(n)); numdiv(sigma(f)) - sigma(numdiv(f));} \\ Amiram Eldar, Mar 16 2025