Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #43 Jan 28 2023 11:45:50
%S 2,3,7,89,1831,5591,89689,3851459,1872851947,1999066711391,
%T 22790428875364879,5333419265419188034369535864125349,
%U 55128448018333565337014555712123010955456071077000028555991469751
%N Smallest prime p such that there is a gap of 2^n between p and the next prime.
%C a(11) <= 79419801290172271035479303914142441 and a(12) <= 55128448018333565337014555712123010955456071077000028555991469751. - _Abhiram R Devesh_, Aug 09 2014
%C From _Zhining Yang_, Dec 02 2022: (Start)
%C a(11) = 5333419265419188034369535864125349, 34 digits, discovered by Helmut Spielauer in 2013
%C a(12) = 55128448018333565337014555712123010955456071077000028555991469751, 65 digits, discovered by Helmut Spielauer in 2013
%C a(13) = 192180552346991956641101827551986346298837407139466361414211497406670710665021150917759713696699494356609164354068319457039591759, 129 digits, discovered by Dana Jacobsen in 2016
%C a(14) = 267552521*631#/210 - 9606, 268 digits, discovered by Dana Jacobsen in 2016
%C a(15) = 2717*1303#/268590 - 16670, 552 digits, discovered by Dana Jacobsen in 2014
%C a(16) = 7079*3559#/9870 - 36310, 1517 digits, discovered by Michiel Jansen, Pierre Cami, and Jens Kruse Andersen in 2013
%C a(17) = 1111111111111111111*9059#/(11#*5237) - 86522, 3899 digits, discovered by Hans Rosenthal in 2017
%C a(11) to a(17) were searched from Thomas R. Nicely's homepage. (End)
%H C. Hilliard, <a href="http://groups.msn.com/NthprimeAlgorithms/twinprimesjava.msnw">TwinPrimes Java code</a>.
%H Thomas R. Nicely, <a href="https://faculty.lynchburg.edu/~nicely/gaps/gaplist.html">First occurrence prime gaps</a> [For local copy see A000101].
%H Thomas R. Nicely, <a href="https://faculty.lynchburg.edu/~nicely/index.html#TPG">Other tables of prime gaps</a>
%F a(n) = A000230(2^(n-1)). - _R. J. Mathar_, Jan 12 2007
%F a(n) = A000230(2^(n-1)) = Min{p|nextprime(p)-p = 2^n} [may need adjusting since offset has been changed].
%e a(2)=7 because 7 and 11 are consecutive primes with difference 2^2=4.
%e a(3)=89 because 89 and 97 are consecutive primes with difference 2^3=8.
%t f[n_] := Block[{k = 1}, While[Prime[k + 1] != n + Prime[k], k++ ]; Prime[k]]; Do[ Print[ f[2^n]], {n, 0, 10}] (* _Robert G. Wilson v_, Jan 13 2005 *)
%o (Python)
%o import sympy
%o n=0
%o while n>=0:
%o ....p=2
%o ....while sympy.nextprime(p)-p!=(2**n):
%o ........p=sympy.nextprime(p)
%o ....print(p)
%o ....n=n+1
%o ....p=sympy.nextprime(p)
%o ## _Abhiram R Devesh_, Aug 09 2014
%Y Cf. A000230, A062530, A101232, A002386.
%K nonn
%O 0,1
%A _Labos Elemer_, Jun 25 2001
%E a(10) sent by _Robert G. Wilson v_, Jan 13 2005