OFFSET
2,3
FORMULA
a(n)=p[Pi(sigma[n])]-p[1+Pi(phi[n])]
EXAMPLE
n=100:sigma[100]=217,prevprime[217]=211, phi[100]=40,nextprime[40]=41,a(100)=211-41=170. The difference is 0 for odd primes.
MATHEMATICA
Table[Prime[PrimePi[DivisorSigma[1, w]]]- Prime[1+PrimePi[EulerPhi[w]]], {w, 2, 128}]
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Labos Elemer, May 08 2002
STATUS
approved