A117587 Numbers k such that 2^prime(k) - prime(k)^2 is prime.
3, 4, 7, 8, 16, 23, 49, 89, 331, 497, 1122, 11222
Offset: 1
Examples
4 is in the sequence because the 4th prime is 7 and 2^7 - 7^2 = 79 is a prime.
Crossrefs
Cf. A072180.
Programs
-
Maple
a:=proc(n) if isprime(2^ithprime(n)-ithprime(n)^2) then n else fi end: seq(a(n),n=1..400); # Emeric Deutsch, Apr 06 2006
-
Mathematica
Select[Range[1200], PrimeQ[2^# - #^2] &@ Prime@ # &] (* Michael De Vlieger, Feb 02 2019 *)
-
PARI
for(i=1,100,if(isprime(2^prime(i)-prime(i)^2),print1(i,",")))
Extensions
3 more terms from Giovanni Resta, Apr 03 2006
One more term from Farideh Firoozbakht, Dec 08 2006
Comments