OFFSET
1,2
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
EXAMPLE
If n = p is prime then divisors - 1 = {1, p} - 1 = {0, p-1} so a(p) = 2 if p <> 3.
240 has 20 divisors, of them 8 divisors d have nonprime value of d-1, {0, 1, 4, 9, 14, 15, 39, 119}, so a(240) = 8.
MATHEMATICA
di[x_] := Divisors[x]; dp[x_] := Part[di[x], Flatten[Position[PrimeQ[ -1+di[x]], True]]]-1; Table[DivisorSigma[0, w]-Length[dp[w]], {w, 1, 128}]
a[n_] := DivisorSum[n, 1 &, !PrimeQ[#-1] &]; Array[a, 100] (* Amiram Eldar, Apr 13 2024 *)
PROG
(PARI) a(n) = sumdiv(n, d, !isprime(d-1)); \\ Amiram Eldar, Apr 13 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, Jun 28 2002
STATUS
approved