login
A074326
Numbers n such that difference between (1+2^n)-th and (2^n)-th primes is 2.
1
1, 6, 8, 9, 17, 23, 27, 39, 48
OFFSET
1,2
FORMULA
Solutions to A051439(x) - A033844(x) = 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