login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A100965 Smallest prime number that ends a prime gap of at least 2n. 1
5, 11, 29, 97, 127, 127, 127, 541, 541, 907, 1151, 1361, 1361, 1361, 1361, 1361, 1361, 9587, 15727, 15727, 15727, 15727, 19661, 19661, 19661, 19661, 31469, 31469, 31469, 31469, 31469, 31469, 31469, 31469, 31469, 31469, 156007, 156007, 156007, 156007 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

The second Mathematica program below generates the first 40 terms of the sequence given a value for nn of 15000. To generate the first 50 terms of the sequence the value of nn needs to be increased to about 32000. If a given value of nn is too low for the number of terms desired, this problem will be signaled by one or more of the generated terms being "NotFound" in which case increasing the value of nn appropriately should permit generating the desired number of terms. - Harvey P. Dale, Jul 10 2018

LINKS

Harvey P. Dale, Table of n, a(n) for n = 1..100

EXAMPLE

a(5)=a(6)=a(7)=127 because there is a gap of 14 between 113 and 127.

MATHEMATICA

k=1; Table[While[Prime[k+1]-Prime[k] < 2n, k++ ]; Prime[k+1], {n, 48}]

Module[{nn=15000, pr, lst}, pr=Prime[Range[2, nn]]; lst=Thread[{pr, PadLeft[ Differences[ pr], nn-1]}]; Table[SelectFirst[lst, #[[2]]>=2n&], {n, 40}]][[All, 1]] (* See Comment, above *) (* This program is several thousand times faster than the first program above *) (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jul 08 2018 *)

CROSSREFS

Cf. A100964.

Sequence in context: A059508 A084817 A183382 * A001632 A234511 A053185

Adjacent sequences:  A100962 A100963 A100964 * A100966 A100967 A100968

KEYWORD

nonn

AUTHOR

T. D. Noe, Nov 23 2004

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 April 24 12:21 EDT 2019. Contains 322429 sequences. (Running on oeis4.)