login
A085343
Number of primes between sigma(n) and phi(n).
4
0, 2, 1, 3, 1, 4, 1, 4, 3, 5, 1, 7, 1, 6, 5, 7, 1, 9, 1, 9, 6, 7, 1, 13, 3, 8, 5, 11, 1, 16, 1, 12, 7, 10, 6, 19, 1, 10, 7, 18, 1, 19, 1, 15, 12, 12, 1, 24, 3, 16, 9, 16, 1, 23, 8, 21, 11, 15, 1, 33, 1, 14, 16, 20, 8, 26, 1, 19, 10, 25, 1, 35, 1, 19, 18, 23, 7, 30, 1, 31, 14, 18, 1, 39, 10, 19
OFFSET
1,2
COMMENTS
a(p) = 1 for prime p > 2. Since phi(p) = p - 1 and sigma(p) = p + 1, the largest prime q < p - 1 must be the prime previous to p, while p itself is the largest prime less than p + 1 for p > 2. - Michael De Vlieger, Jan 22 2020
LINKS
FORMULA
a(n) = Pi(sigma(n)) - Pi(phi(n)) = A000720(A000203(n)) - A000720(A000010(n)).
a(n) = A070803(n) - A070804(n). - Antti Karttunen, Jan 22 2020
EXAMPLE
n=12: sigma(12)=28, phi(n)=4, Pi(28)-Pi(4)=9-2=7.
MATHEMATICA
Array[Subtract @@ PrimePi@{DivisorSigma[1, #], EulerPhi@ #} &, 86] (* Michael De Vlieger, Jan 22 2020 *)
PROG
(PARI) a(n) = primepi(sigma(n)) - primepi(eulerphi(n)); \\ Michel Marcus, Aug 29 2019
KEYWORD
nonn
AUTHOR
Labos Elemer, Jul 10 2003
STATUS
approved