login
A072628
Number of divisors d of n such that d-1 is not prime.
1
1, 2, 1, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 3, 3, 3, 2, 3, 2, 4, 3, 4, 2, 2, 3, 4, 3, 4, 2, 5, 2, 3, 3, 4, 4, 4, 2, 3, 3, 5, 2, 4, 2, 4, 5, 4, 2, 3, 3, 6, 3, 5, 2, 4, 4, 5, 3, 4, 2, 5, 2, 3, 5, 4, 4, 6, 2, 4, 3, 7, 2, 4, 2, 3, 5, 4, 4, 6, 2, 6, 4, 4, 2, 5, 4, 4, 3, 5, 2, 7, 4, 5, 3, 4, 4, 4, 2, 4, 5, 7, 2, 5, 2, 5, 7
OFFSET
1,2
LINKS
FORMULA
a(n) = A000005(n) - A072627(n) < A000005(n).
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
Sequence in context: A029417 A029237 A078641 * A343901 A193386 A068212
KEYWORD
nonn
AUTHOR
Labos Elemer, Jun 28 2002
STATUS
approved