A244913 Primes prime(k) such that 2^(k-1) - prime(k) is also prime.
11, 13, 17, 19, 23, 37, 61, 233, 257, 1553, 2879, 4919, 6389, 7621, 8081, 35593, 37951, 96263, 206419, 596803, 1202837, 2837851
Offset: 1
Programs
-
Maple
for i from 1 do p := ithprime(i) ; if isprime(2^(numtheory[pi](p-1))-p) then printf("%d,\n",p) ; end if; end do: # R. J. Mathar, Jul 11 2014
-
Mathematica
p = 2; lst = {}; While[p < 800001, If[ PrimeQ[ 2^(PrimePi@ p-1) - p], AppendTo[lst, p]; Print@ p]; p = NextPrime@ p]; lst n=1;Monitor[Parallelize[While[True,If[PrimeQ[2^(PrimePi[Prime[n]-1])-Prime[n]],Print[Prime[n]]];n++];n],n] (* J.W.L. (Jan) Eerland, Dec 08 2022 *)
-
PARI
is(n)=isprime(n) && isprime(2^primepi(n-1)-n) \\ Charles R Greathouse IV, Feb 25 2017
Formula
Extensions
a(21) from J.W.L. (Jan) Eerland, Dec 08 2022
a(22) from Michael S. Branicky, Jun 02 2025
Comments