OFFSET
1,2
EXAMPLE
n=39: 2^39=549755813888, prime(549755813889) = 16149760533343, prime(549755813888) = 16149760533341, difference=2, just twin primes.
MATHEMATICA
s=0; Do[s=Prime[1+2^n]-Prime[2^n]; If[s==2, Print[{n, Prime[2^n]}]], {n, 1, 40}]
diffQ[n_]:=Module[{prn=Prime[2^n]}, NextPrime[prn]-prn==2]; Select[ Range[ 40], diffQ] (* Harvey P. Dale, Aug 21 2014 *)
CROSSREFS
KEYWORD
more,nonn
AUTHOR
Labos Elemer, Aug 21 2002
EXTENSIONS
a(9) from Chai Wah Wu, Feb 28 2019
STATUS
approved