cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A062529 Smallest prime p such that there is a gap of 2^n between p and the next prime.

This page as a plain text file.
%I A062529 #57 May 02 2025 07:58:59
%S A062529 2,3,7,89,1831,5591,89689,3851459,1872851947,1999066711391,
%T A062529 22790428875364879
%N A062529 Smallest prime p such that there is a gap of 2^n between p and the next prime.
%C A062529 a(11) <= 79419801290172271035479303914142441 and  a(12) <= 55128448018333565337014555712123010955456071077000028555991469751. - _Abhiram R Devesh_, Aug 09 2014
%C A062529 From _Zhining Yang_, Dec 02 2022: (Start)
%C A062529 a(11) = 5333419265419188034369535864125349, 34 digits, discovered by Helmut Spielauer in 2013
%C A062529 a(12) = 55128448018333565337014555712123010955456071077000028555991469751, 65 digits, discovered by Helmut Spielauer in 2013
%C A062529 a(13) = 192180552346991956641101827551986346298837407139466361414211497406670710665021150917759713696699494356609164354068319457039591759, 129 digits, discovered by Dana Jacobsen in 2016
%C A062529 a(14) = 267552521*631#/210 - 9606, 268 digits, discovered by Dana Jacobsen in 2016
%C A062529 a(15) = 2717*1303#/268590 - 16670, 552 digits, discovered by Dana Jacobsen in 2014
%C A062529 a(16) = 7079*3559#/9870 - 36310, 1517 digits, discovered by Michiel Jansen, Pierre Cami, and Jens Kruse Andersen in 2013
%C A062529 a(17) = 1111111111111111111*9059#/(11#*5237) - 86522, 3899 digits, discovered by Hans Rosenthal in 2017
%C A062529 a(11) to a(17) were searched from Thomas R. Nicely's homepage. (End)
%C A062529 Importantly, the values in the previous comment are only upper bounds on a(11)-a(17), and are (almost certainly) not the correct values. As of this comment, the largest prime gap length whose first occurrence is known is 1676 < 2^11. - _Brian Kehrig_, May 01 2025
%H A062529 Cino Hilliard, <a href="http://groups.msn.com/NthprimeAlgorithms/twinprimesjava.msnw">TwinPrimes Java code</a>.
%H A062529 Thomas R. Nicely, <a href="https://faculty.lynchburg.edu/~nicely/gaps/gaplist.html">First occurrence prime gaps</a> [For local copy see A000101].
%H A062529 Thomas R. Nicely, <a href="https://faculty.lynchburg.edu/~nicely/index.html#TPG">Other tables of prime gaps</a>
%F A062529 a(n) = A000230(2^(n-1)). - _R. J. Mathar_, Jan 12 2007
%F A062529 a(n) = A000230(2^(n-1)) = Min{p|nextprime(p)-p = 2^n} [may need adjusting since offset has been changed].
%e A062529 a(2)=7 because 7 and 11 are consecutive primes with difference 2^2=4.
%e A062529 a(3)=89 because 89 and 97 are consecutive primes with difference 2^3=8.
%t A062529 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 A062529 (Python)
%o A062529 import sympy
%o A062529 n=0
%o A062529 while n>=0:
%o A062529     p=2
%o A062529     while sympy.nextprime(p)-p!=(2**n):
%o A062529         p=sympy.nextprime(p)
%o A062529     print(p)
%o A062529     n=n+1
%o A062529     p=sympy.nextprime(p)
%o A062529 ## _Abhiram R Devesh_, Aug 09 2014
%Y A062529 Cf. A000230, A062530, A101232, A002386.
%K A062529 nonn
%O A062529 0,1
%A A062529 _Labos Elemer_, Jun 25 2001
%E A062529 a(10) sent by _Robert G. Wilson v_, Jan 13 2005
%E A062529 a(11)-a(12) removed by _Brian Kehrig_, May 01 2025