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.

A268140 Smallest prime followed by at least 2^n nonprimes.

This page as a plain text file.
%I A268140 #28 Oct 28 2021 13:26:52
%S A268140 3,7,23,113,523,1327,31397,1357201,436273009,304599508537,
%T A268140 1693182318746371
%N A268140 Smallest prime followed by at least 2^n nonprimes.
%C A268140 a(16) <= 1931*A034386(1933)/7230 - 30244 (see J. K. Andersen link). Subsequence of A002386. - _Chai Wah Wu_, Feb 15 2016
%C A268140 From _Chai Wah Wu_, Jun 26 2019: (Start)
%C A268140 Upper bounds derived from data in Nicely:
%C A268140 a(11) <= 3001549619028223830552751967
%C A268140 a(12) <= 8298167160043173312303446808147809006055739815894846173
%C A268140 a(13) <= 293703234068022590158723766104419463425709075574811762098588798217895728858676728143227
%C A268140 a(14) <= 650094367*A034396(491)/2310 - 8936
%C A268140 a(15) <= 43882589*A034386(1063)/210 - 28456
%C A268140 a(17) <= 949*A034386(4691)/210 - 65386
%C A268140 a(18) <= 1111111111111111111*A034386(9293)/75201696570 - 138310
%C A268140 a(19) <= A034386(24137)/2310 - 311774
%C A268140 a(20) <= 587*A034386(43103)/2310 - 455704
%C A268140 a(21) <= A034386(90823)/510510 - 1065962
%C A268140 a(22) <= A034386(230077)/2229464046810 - 3131794
%C A268140 (End)
%H A268140 Jens Kruse Andersen, <a href="http://primerecords.dk/primegaps/maximal.htm">Maximal Prime Gaps</a>
%H A268140 Thomas R. Nicely, <a href="/A007053/a007053_1.pdf">Some Results of Computational Research in Prime Numbers</a> [Local copy, pdf only] [ See local copy in A007053]
%e A268140 3 is the smallest prime followed by 1 composite number,
%e A268140 7 is the smallest prime followed by 2 or more composite numbers,
%e A268140 23 is the smallest prime followed by 4 or more composite numbers,
%e A268140 113 is the smallest prime followed by 8 or more composite numbers.
%t A268140 Table[p = 2; While[NextPrime@ p - p <= 2^n, p = NextPrime@ p]; p, {n, 0, 7}] (* _Michael De Vlieger_, Jan 27 2016 *)
%o A268140 (PARI) a(n) = {my(p = 2); while(((q=nextprime(p+1)) - p) < 2^n+1, p = q); p;} \\ _Michel Marcus_, Jan 27 2016
%o A268140 (Python)
%o A268140 from sympy import isprime
%o A268140 def A268140(n):
%o A268140     p, n2 = 2, 2**n+1
%o A268140     while True:
%o A268140         for i in range(1,n2):
%o A268140             if isprime(p+i):
%o A268140                 p += i
%o A268140                 break
%o A268140         else:
%o A268140             return p # _Chai Wah Wu_, Feb 15 2016
%Y A268140 Cf. A000040, A002386, A053976.
%K A268140 nonn,hard,more
%O A268140 0,1
%A A268140 _Alex Ratushnyak_, Jan 27 2016
%E A268140 a(8)-a(10) taken from J. K. Andersen's Maximal Prime Gaps webpage by _Chai Wah Wu_, Feb 15 2016