%I #32 May 22 2017 03:35:35
%S 3,2,2,2,2,2,2,2,2,2,5,2,2,2,2,2,2,7,2,11,3,2,113,2,43,2,2,5,151,2,2,
%T 2,2,2,179,3,61,2,23,2,53,2,89,137,11,2,5,5,2,7,73,11,307,7,7,2,5,7,
%U 19,3,2,2,3,0,2,53,491,197,2,3,3,3,11,19,59,7,2,2,271,2,191,61,41,7,2,2,59,5,2,2
%N Smallest prime p such that Phi_n(p) is also prime, where Phi is the cyclotomic polynomial, or 0 if no such p exists.
%C Conjecture: a(n) > 0 for all n != 2^k (k>5).
%C Clearly, if n is a power of 2, and Phi_n(2) is not prime, then a(n) = 0.
%C Records: 3, 5, 7, 11, 113, 151, 179, 307, 491, 839, 1427, 2411, 5987, 6389, 8933, 11813, 18587, 31721, 40763, 46349, ..., . - _Robert G. Wilson v_, May 21 2017
%H Robert G. Wilson v, <a href="/A252503/b252503.txt">Table of n, a(n) for n = 1..1300</a> (first 1000 terms from Charles R Greathouse IV)
%t Do[n=1; p=Prime[n]; cp=Cyclotomic[k, p]; While[!PrimeQ[cp], n=n+1; p=Prime[n]; cp=Cyclotomic[k, p]]; Print[p], {k, 1, 300}]
%o (PARI) a(n)=if(n>>valuation(n,2)==1 && n>32, if(ispseudoprime(2^(n/2)+1), 2, 0), my(P=polcyclo(n)); forprime(p=2,, if(ispseudoprime(subst(P,'x,p)), return(p)))) \\ _Charles R Greathouse IV_, Dec 18 2014
%Y Cf. A123487, A123627, A085398, A066180, A103795.
%K nonn
%O 1,1
%A _Eric Chen_, Dec 18 2014