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!)
A268140 Smallest prime followed by at least 2^n nonprimes. 1
3, 7, 23, 113, 523, 1327, 31397, 1357201, 436273009, 304599508537, 1693182318746371 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,1

COMMENTS

a(16) <= 1931*A034386(1933)/7230 - 30244 (see J. K. Andersen link). Subsequence of A002386. - Chai Wah Wu, Feb 15 2016

From Chai Wah Wu, Jun 26 2019: (Start)

Upper bounds derived from data in http://www.trnicely.net/index.html#TPG:

a(11) <= 3001549619028223830552751967

a(12) <= 8298167160043173312303446808147809006055739815894846173

a(13) <= 293703234068022590158723766104419463425709075574811762098588798217895728858676728143227

a(14) <= 650094367*A034396(491)/2310 - 8936

a(15) <= 43882589*A034386(1063)/210 - 28456

a(17) <= 949*A034386(4691)/210 - 65386

a(18) <= 1111111111111111111*A034386(9293)/75201696570 - 138310

a(19) <= A034386(24137)/2310 - 311774

a(20) <= 587*A034386(43103)/2310 - 455704

a(21) <= A034386(90823)/510510 - 1065962

a(22) <= A034386(230077)/2229464046810 - 3131794

(End)

LINKS

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

Jens Kruse Andersen, Maximal Prime Gaps

EXAMPLE

3 is the smallest prime followed by 1 composite number,

7 is the smallest prime followed by 2 or more composite numbers,

23 is the smallest prime followed by 4 or more composite numbers,

113 is the smallest prime followed by 8 or more composite numbers.

MATHEMATICA

Table[p = 2; While[NextPrime@ p - p <= 2^n, p = NextPrime@ p]; p, {n, 0, 7}] (* Michael De Vlieger, Jan 27 2016 *)

PROG

(PARI) a(n) = {my(p = 2); while(((q=nextprime(p+1)) - p) < 2^n+1, p = q); p; } \\ Michel Marcus, Jan 27 2016

(Python)

from sympy import isprime

def A268140(n):

    p, n2 = 2, 2**n+1

    while True:

        for i in range(1, n2):

            if isprime(p+i):

                p += i

                break

        else:

            return p # Chai Wah Wu, Feb 15 2016

CROSSREFS

Cf. A000040, A002386, A053976.

Sequence in context: A080077 A096318 A299404 * A133788 A120271 A145938

Adjacent sequences:  A268137 A268138 A268139 * A268141 A268142 A268143

KEYWORD

nonn,hard,more

AUTHOR

Alex Ratushnyak, Jan 27 2016

EXTENSIONS

a(8)-a(10) taken from J. K. Andersen's Maximal Prime Gaps webpage by Chai Wah Wu, Feb 15 2016

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 July 29 17:41 EDT 2021. Contains 346346 sequences. (Running on oeis4.)