%I #19 May 01 2023 10:01:51
%S 9,15,39,75,81,735,1311,1881,3201,3225,11795,88071,204129,678561
%N Composite numbers q such that 2^q + q is prime.
%H Cino Hilliard, <a href="http://groups.msn.com/BC2LCC/2qqisprime3divq.msnw">Title?</a>. [Dead link]
%e For q = 9, 2^9 + 9 = 521, prime.
%e Note that 2^11795 + 11795 is prime but 11795 is composite and not divisible by 3.
%t Do[If[ !PrimeQ[n] && PrimeQ[2^n + n], Print[n]], {n, 2, 10^6}] (* _Ryan Propper_, Jul 21 2006 *)
%t nn=15000;Select[Complement[Range[2,nn],Prime[Range[PrimePi[nn]]]], PrimeQ[2^#+#]&] (* _Harvey P. Dale_, May 05 2011 *)
%o (PARI) \ p^q + q is prime q not prime ptoqpq(p,n)= { local(x,y,q); for(q=6,n, if(q%2, if(!isprime(q), y=p^q+q; if(ispseudoprime(y),print(q","y",")) ) ) ) }
%Y Composite terms in A052007.
%K nonn,more
%O 1,1
%A _Cino Hilliard_, Jan 12 2005
%E a(11) from _Ryan Propper_, Jul 21 2006
%E a(12)-a(14) (using A052007) from _Michael S. Branicky_, Apr 30 2023
|