A057678 Primes of the form 2^p - p where p is prime.
2, 5, 8179, 524269
Offset: 1
Examples
p=3 is prime, and so is 2^p - p = 8 - 3 = 5, so 5 is in the sequence. - _Michael B. Porter_, Jul 19 2016
Programs
-
Maple
a:=proc(n) if isprime(2^ithprime(n)-ithprime(n))=true then 2^ithprime(n)-ithprime(n) else fi end: seq(a(n),n=1..310); # Emeric Deutsch
-
Mathematica
lst={};Do[p=Prime[n];If[PrimeQ[p=2^p-p],AppendTo[lst,p]],{n,5!}];lst (* Vladimir Joseph Stephan Orlovsky, Jan 28 2009 *) Select[Table[2^p-p,{p,Prime[Range[20]]}],PrimeQ] (* Harvey P. Dale, Sep 20 2018 *)
Comments