A128945 Numbers n such that the greatest prime < 2^n is a twin prime member.
2, 3, 4, 5, 6, 10, 12, 16, 20, 149, 150, 476, 594, 788, 1574, 1664, 1691, 6117, 6242
Offset: 1
Examples
For n=5, 31 is the greatest prime < 2^5 and is a member of the twin prime pair 29, 31.
Programs
-
Mathematica
Select[Range[1700],AnyTrue[NextPrime[2^#,-1]+{2,-2},PrimeQ]&] (* The program generates the first 17 terms of the sequence. *) (* Harvey P. Dale, Mar 26 2025 *)
-
PARI
g(n,b)=for(x=1,n,y=precprime(b^x);if(ispseudoprime(y-2),print1(x",")))
Extensions
Edited by and terms a(15)-a(17) from Ray Chandler, May 12 2007
a(18), a(19) Donovan Johnson, Feb 21 2008
Comments