A048869 Numbers for which reduced residue system contains as many primes as nonprimes.
3, 4, 5, 6, 7, 9, 10, 15, 21, 45, 58, 82, 86, 92, 105, 116, 196, 238, 308, 310, 320, 380, 972, 978, 996, 1068, 1368, 5640, 10890
Offset: 1
Examples
n=45, phi(45)=24 and the reduced residue system mod 45 contains 12 primes {2,7,11,13,17,19,23,29,31,37,41,43} and 12 nonprimes {1,4,8,14,16,22,26,28,32,34,38,44}.
Programs
-
Mathematica
Select[Range[700000], 2(PrimePi[ # ] - Length[FactorInteger[ # ]]) == EulerPhi[ # ]&] For[i = 1, i < 20000, i++, If[2(PrimePi[i] - Length[FactorInteger[i]]) == EulerPhi[i], Print[i]]]; (* Sam Handler (sam_5_5_5_0(AT)yahoo.com), Aug 29 2006 *)
-
PARI
p=0;for(n=1,6e4,if(isprime(n),p++);if(p==eulerphi(n)/2+omega(n),print1(n", "))) \\ Charles R Greathouse IV, Dec 19 2011
Extensions
More terms from Sam Handler (sam_5_5_5_0(AT)yahoo.com), Aug 29 2006
Comments