A073457 Numbers k such that phi(k) = pi(k) + 2.
7, 9, 15, 16, 22, 54, 66, 120, 210
Offset: 1
Examples
8 primes below 22 = {2,3,5,7,11,13,17,19}; 10 terms in RRS[22]={1,3,5,7,9,13,15,17,19,21}, so 22 is here.
Programs
-
Magma
[n: n in [2..1000] | EulerPhi(n) eq #PrimesUpTo(n)+2]; // Vincenzo Librandi, May 10 2015
-
Maple
with(numtheory): A073457:=n->`if`(phi(n) = pi(n) + 2, n, NULL): seq(A073457(n), n=1..210); # Wesley Ivan Hurt, May 12 2015
-
Mathematica
Do[s=EulerPhi[n]-PrimePi[n]; If[Equal[s, 2], Print[n]], {n, 10000}] Select[Range[250],EulerPhi[#]-PrimePi[#]==2&] (* Harvey P. Dale, Jun 22 2025 *)
Comments