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.

Showing 1-5 of 5 results.

A140791 First occurrence of prime gap 10*n.

Original entry on oeis.org

139, 887, 4297, 19333, 31907, 43331, 173359, 542603, 404851, 396733, 1468277, 1895359, 5518687, 7621259, 13626257, 33803689, 27915737, 17051707, 142414669, 378043979, 20831323, 47326693, 607010093, 391995431, 387096133, 944192807
Offset: 1

Views

Author

Lekraj Beedassy, Jul 14 2008

Keywords

References

  • J.-M. De Koninck, Ces nombres qui nous fascinent, Entry 139, pp 47, Ellipses, Paris 2008.

Crossrefs

Formula

a(n)=A000230(5n), a(3n) = A224522(n) = A058193(5n). - M. F. Hasler, Apr 09 2013

Extensions

Offset corrected by Arkadiusz Wesolowski, Jun 07 2011

A058193 Smallest prime p such that there is a gap of 6n between p and the next prime.

Original entry on oeis.org

23, 199, 523, 1669, 4297, 9551, 16141, 28229, 35617, 43331, 162143, 31397, 188029, 461717, 404851, 360653, 1444309, 2238823, 492113, 1895359, 1671781, 1357201, 3826019, 11981443, 13626257, 17983717, 39175217, 37305713, 52721113
Offset: 1

Views

Author

Labos Elemer, Nov 28 2000

Keywords

Examples

			d = 72 appears after 31397, while smaller d = 54, 60, 66 come later, following primes 35617, 43331, 162143, respectively.
		

Crossrefs

Programs

  • Mathematica
    Module[{nn=32*10^5,prs,gps},prs=Prime[Range[nn]];gps=Differences[prs];Table[SelectFirst[Thread[{Most[prs],gps}],#[[2]]==6n&],{n,30}]][[;;,1]] (* Harvey P. Dale, Mar 03 2025 *)
  • PARI
    a(n) = {p=3; q = nextprime(p+1); while((q-p) != 6*n, p = q; q = nextprime(q+1)); p;} \\ Michel Marcus, Mar 12 2016

Formula

a(n) = A000230(3n).

Extensions

Offset corrected by M. F. Hasler, Apr 09 2013

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

Original entry on oeis.org

2, 3, 7, 89, 1831, 5591, 89689, 3851459, 1872851947, 1999066711391, 22790428875364879
Offset: 0

Views

Author

Labos Elemer, Jun 25 2001

Keywords

Comments

a(11) <= 79419801290172271035479303914142441 and a(12) <= 55128448018333565337014555712123010955456071077000028555991469751. - Abhiram R Devesh, Aug 09 2014
From Zhining Yang, Dec 02 2022: (Start)
a(11) = 5333419265419188034369535864125349, 34 digits, discovered by Helmut Spielauer in 2013
a(12) = 55128448018333565337014555712123010955456071077000028555991469751, 65 digits, discovered by Helmut Spielauer in 2013
a(13) = 192180552346991956641101827551986346298837407139466361414211497406670710665021150917759713696699494356609164354068319457039591759, 129 digits, discovered by Dana Jacobsen in 2016
a(14) = 267552521*631#/210 - 9606, 268 digits, discovered by Dana Jacobsen in 2016
a(15) = 2717*1303#/268590 - 16670, 552 digits, discovered by Dana Jacobsen in 2014
a(16) = 7079*3559#/9870 - 36310, 1517 digits, discovered by Michiel Jansen, Pierre Cami, and Jens Kruse Andersen in 2013
a(17) = 1111111111111111111*9059#/(11#*5237) - 86522, 3899 digits, discovered by Hans Rosenthal in 2017
a(11) to a(17) were searched from Thomas R. Nicely's homepage. (End)
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

Examples

			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.
		

Crossrefs

Programs

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

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].

Extensions

a(10) sent by Robert G. Wilson v, Jan 13 2005
a(11)-a(12) removed by Brian Kehrig, May 01 2025

A381510 Smaller of two consecutive primes p and q, both ending with 7, such that q - p = 10n, or -1 if no such primes exist.

Original entry on oeis.org

337, 887, 4297, 33247, 31907, 124367, 218287, 1122287, 1964987, 1313467, 1468277, 7160227, 5518687, 16525757, 13626257, 71880637, 27915737, 17051707, 394059907, 566348087, 252314747, 472865287, 1289694257, 633418787, 1588640437, 944192807, 1391048047, 7059848287
Offset: 1

Views

Author

Jean-Marc Rebert, Feb 25 2025

Keywords

Examples

			a(1) = 337, because 337 and 337 + 10 = 347 are two consecutive primes with the same last digit 7 and no smaller prime has this property.
		

Crossrefs

Programs

  • PARI
    a(n) = my(p=7); while (!isprime(p) || ((nextprime(p+1)-p) != 10*n), p+=10); p; \\ Michel Marcus, Feb 25 2025
    
  • Python
    from sympy import nextprime, isprime
    def A381510(n):
        p = 17
        while (q:=nextprime(p)):
            if q-p == 10*n:
                return p
            p = q+9-(q+2)%10
            while not isprime(p):
                p += 10 # Chai Wah Wu, Mar 09 2025

A381511 Smaller of two consecutive primes p and q, both ending with 9, such that q - p = 10*n, or -1 if no such primes exist.

Original entry on oeis.org

139, 3089, 5749, 20809, 60539, 110359, 173359, 618719, 1294849, 838249, 6877109, 1895359, 11188759, 7621259, 35560009, 33803689, 124956059, 92801029, 142414669, 378043979, 229316459, 390932389, 1095750599, 995151679, 2174082649, 2603726969, 3402493709, 1997191249
Offset: 1

Views

Author

Jean-Marc Rebert, Feb 25 2025

Keywords

Examples

			a(1) = 139, because 139 and 139 + 10 = 149 are two consecutive primes with the same last digit 9 and no smaller p has this property.
		

Crossrefs

Programs

  • PARI
    a(n) = my(p=9); while (!isprime(p) || ((nextprime(p+1)-p) != 10*n), p+=10); p; \\ Michel Marcus, Feb 25 2025
    
  • Python
    from sympy import isprime, nextprime
    def A381511(n):
        p = 19
        while (q:=nextprime(p)):
            if q-p == 10*n:
                return p
            p = q+9-(q%10)
            while not isprime(p):
                p += 10 # Chai Wah Wu, Mar 08 2025
Showing 1-5 of 5 results.