login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A062529 Smallest prime p such that there is a gap of 2^n between p and the next prime. 6
2, 3, 7, 89, 1831, 5591, 89689, 3851459, 1872851947, 1999066711391, 22790428875364879 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,1

COMMENTS

a(11) <= 79419801290172271035479303914142441 and  a(12) <= 55128448018333565337014555712123010955456071077000028555991469751. - Abhiram R Devesh, Aug 09 2014

LINKS

Table of n, a(n) for n=0..10.

C. Hilliard, TwinPrimes Java code.

Thomas R. Nicely, First occurrence prime gaps.

FORMULA

a(n) = A000230[2^(n-1)]. - R. J. Mathar, Jan 12 2007

a(n) = A000230[2^(n-1)] = Min{p|nextprime(p)-p = 2^n} [May need adjusting since offset has been changed]

EXAMPLE

a(2)=7 because 7 and 11 are consecutive primes with difference 2^2=4.

a(3)=89 because 89 and 97 are consecutive primes with difference 2^3=8.

MATHEMATICA

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 *)

PROG

(Python)

import sympy

n=0

while n>=0:

....p=2

....while  sympy.nextprime(p)-p!=(2**n):

........p=sympy.nextprime(p)

....print(p)

....n=n+1

....p=sympy.nextprime(p)

## Abhiram R Devesh, Aug 09 2014

CROSSREFS

Cf. A000230, A062530, A101232, A002386.

Sequence in context: A053964 A308730 A062578 * A308917 A058443 A163152

Adjacent sequences:  A062526 A062527 A062528 * A062530 A062531 A062532

KEYWORD

nonn

AUTHOR

Labos Elemer, Jun 25 2001

EXTENSIONS

a(10) sent by Robert G. Wilson v, Jan 13 2005

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 24 10:18 EDT 2020. Contains 337317 sequences. (Running on oeis4.)