login
Primes p such that pi(p) is a primitive root modulo p, where pi(p) is the number of primes not exceeding p.
6

%I #5 May 21 2014 23:46:39

%S 2,3,5,13,17,29,31,41,47,61,89,101,107,137,167,179,193,197,223,229,

%T 251,257,263,271,293,313,337,347,353,379,401,431,439,487,499,587,593,

%U 599,601,643,647,653,659,677,701,727,733,739,751,797,821,823,829,857,919,929,941,967,971,983

%N Primes p such that pi(p) is a primitive root modulo p, where pi(p) is the number of primes not exceeding p.

%C According to the conjecture in A232748, this sequence should contain infinitely many primes.

%H Zhi-Wei Sun, <a href="/A242752/b242752.txt">Table of n, a(n) for n = 1..10000</a>

%e a(3) = 5 since 5 is prime with pi(5) = 3 a primitive root modulo 5.

%t dv[n_]:=Divisors[n]

%t n=0;Do[Do[If[Mod[k^(Part[dv[Prime[k]-1],j]),Prime[k]]==1,Goto[aa]],{j,1,Length[dv[Prime[k]-1]]-1}];n=n+1;Print[n," ",Prime[k]];Label[aa];Continue,{k,1,166}]

%Y Cf. A000040, A000720, A242748, A242750.

%K nonn

%O 1,1

%A _Zhi-Wei Sun_, May 21 2014