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-7 of 7 results.

A204672 Primes followed by a gap of 120.

Original entry on oeis.org

1895359, 2898239, 6085441, 7160227, 7784039, 7803491, 7826899, 8367397, 8648557, 9452959, 10052071, 10863973, 11630503, 11962823, 12109697, 12230233, 12415681, 14411737, 14531899, 15014557, 15020737, 15611909, 16179041
Offset: 1

Views

Author

M. F. Hasler, Jan 18 2012

Keywords

Crossrefs

Cf. A058193 (first gap of 6n), A140791 (first gap of 10n).
Cf. A126771 (gap 60), A126724 (gap 150), A204673 (gap 180).

Programs

  • MATLAB
    N = 2*10^7; % to get all terms <= N
    P = primes(N+120);
    J = find(P(2:end) - P(1:end-1) == 120);
    P(J)  % Robert Israel, Feb 28 2017
  • Mathematica
    Transpose[Select[Partition[Prime[Range[1100000]],2,1],Last[#]-First[#] == 120&]] [[1]] (* Harvey P. Dale, Jul 11 2014 *)
  • PARI
    g=120;c=o=0;forprime(p=1,default(primelimit),(-o+o=p)==g&write("c:/temp/b204672.txt",c++" "p-g))
    

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

Original entry on oeis.org

181, 13421, 4831, 25261, 95651, 43331, 175141, 1060781, 404851, 1648081, 2597981, 6085441, 22151281, 10270451, 25180321, 79817581, 84549821, 135045091, 306099181, 529811591, 164710681, 707429491, 965524181, 391995431, 428045491, 1516828721, 4272226951, 2337682591
Offset: 1

Views

Author

Jean-Marc Rebert, Feb 03 2025

Keywords

Examples

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

Crossrefs

Programs

  • PARI
    a(n) = my(p=11); while (!isprime(p) || ((nextprime(p+1)-p) != 10*n), p+=10); p; \\ Michel Marcus, Feb 20 2025

A224472 Primes followed by a gap of 300.

Original entry on oeis.org

4758958741, 5612345261, 6169169561, 6306815239, 6646984159, 7335508261, 8645089003, 8806019249, 9047808247, 9148138313, 9466071347, 9907846261, 10055451683, 11063821453, 11475026363, 11603081459, 12292390637, 12750876857, 13833827471, 14636472007, 15876700949
Offset: 1

Views

Author

Zak Seidov, Apr 07 2013

Keywords

Comments

The first twin gap equal to 300 occurs for p = 6537587646371. - Giovanni Resta, Apr 07 2013

Crossrefs

Cf. A058193 (first gap of 6n), A140791 (first gap of 10n), A126771 (gap 60), A126724 (gap 150), A204673 (gap 180), A204807 (gap 200), A000230, A001359, A204672, A029710, A031924-A031938, A061779, A098974, A124594-A124596, A126784, A134116-A134124, A204665-A204670.

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

Original entry on oeis.org

283, 3413, 7253, 19333, 45893, 142993, 399283, 542603, 818723, 396733, 3240983, 10863973, 32788543, 8917523, 17652013, 92593183, 80935103, 92510963, 257789053, 481691513, 20831323, 47326693, 607010093, 1461724573, 387096133, 1496441363, 2298026803, 1855047163
Offset: 1

Views

Author

Jean-Marc Rebert, Feb 23 2025

Keywords

Examples

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

Crossrefs

Programs

  • PARI
    a(n) = my(p=3); while (!isprime(p) || ((nextprime(p+1)-p) != 10*n), p+=10); p; \\ Michel Marcus, Feb 24 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

A224522 Least prime which is followed by a gap of 30n.

Original entry on oeis.org

4297, 43331, 404851, 1895359, 13626257, 17051707, 20831323, 391995431, 1391048047, 4758958741, 6291356009, 20068818197, 53241805651, 82490815123, 63816175447, 482423533897, 2209016910131, 738832927927, 4442109925217, 4872634110067, 12644461143649, 10653514291843, 15712145060693, 111113196467011
Offset: 1

Views

Author

M. F. Hasler, Apr 09 2013

Keywords

Comments

Data up to 2e9 computed independently and (up to 391995431) double-checked with A140791. Data beyond 2e9 taken from Nicely's web page (which would yield further terms, at least up to a(47) - notice that the "?" in column 10, e.g. for gap 1440, indicates that the listed values is the first *known*, but maybe not the first occurrence). See there for credits.

Programs

  • PARI
    o=2;g=30;forprime(p=3,,(o+g != o=p) & next; print1(p-g",");g+=30) \\ Warning: this code assumes that the sequence is increasing, which may not be the case. - M. F. Hasler, Apr 09 2013

Formula

a(n) = A000230(15n) = A058193(5n) = A140791(3n)

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-7 of 7 results.