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

A229021 Record values in A226657.

Original entry on oeis.org

5, 7, 23, 389, 409, 1511, 5309, 7351, 37223, 142811, 763271, 8066923, 9182389, 10237391, 24374033, 70353383, 128463691, 334100083, 358453847, 610611193
Offset: 1

Views

Author

Arkadiusz Wesolowski, Sep 11 2013

Keywords

Crossrefs

A229028 Indices of records in A226657.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 9, 10, 13, 16, 23, 29, 31, 34, 37, 41, 44, 52, 53
Offset: 1

Views

Author

Arkadiusz Wesolowski, Sep 11 2013

Keywords

Crossrefs

A000230 a(0)=2; for n>=1, a(n) = smallest prime p such that there is a gap of exactly 2n between p and next prime, or -1 if no such prime exists.

Original entry on oeis.org

2, 3, 7, 23, 89, 139, 199, 113, 1831, 523, 887, 1129, 1669, 2477, 2971, 4297, 5591, 1327, 9551, 30593, 19333, 16141, 15683, 81463, 28229, 31907, 19609, 35617, 82073, 44293, 43331, 34061, 89689, 162143, 134513, 173359, 31397, 404597, 212701, 188029, 542603, 265621, 461717, 155921, 544279, 404851, 927869, 1100977, 360653, 604073
Offset: 0

Views

Author

Keywords

Comments

p + 1 = A045881(n) starts the smallest run of exactly 2n-1 successive composite numbers. - Lekraj Beedassy, Apr 23 2010
Weintraub gives upper bounds on a(252), a(255), a(264), a(273), and a(327) based on a search from 1.1 * 10^16 to 1.1 * 10^16 + 1.5 * 10^9, probably performed on a 1970s microcomputer. - Charles R Greathouse IV, Aug 26 2022

Examples

			The following table, based on a very much larger table in the web page of Tomás Oliveira e Silva (see link) shows, for each gap g, P(g) = the smallest prime such that P(g)+g is the smallest prime number larger than P(g);
* marks a record-holder: g is a record-holder if P(g') > P(g) for all (even) g' > g, i.e., if all prime gaps are smaller than g for all primes smaller than P(g); P(g) is a record-holder if P(g') < P(g) for all (even) g' < g.
This table gives rise to many sequences: P(g) is A000230, the present sequence; P(g)* is A133430; the positions of the *'s in the P(g) column give A100180, A133430; g* is A005250; P(g*) is A002386; etc.
   -----
   g P(g)
   -----
   1* 2*
   2* 3*
   4* 7*
   6* 23*
   8* 89*
   10 139*
   12 199*
   14* 113
   16 1831*
   18* 523
   20* 887
   22* 1129
   24 1669
   26 2477*
   28 2971*
   30 4297*
   32 5591*
   34* 1327
   36* 9551*
   ........
The first time a gap of 4 occurs between primes is between 7 and 11, so a(2)=7 and A001632(2)=11.
		

References

  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

A001632(n) = 2n + a(n) = nextprime(a(n)).
Cf. A100964 (least prime number that begins a prime gap of at least 2n).

Programs

Formula

a(n) = A000040(A038664(n)). - Lekraj Beedassy, Sep 09 2006

Extensions

a(29)-a(37) from Jud McCranie, Dec 11 1999
a(38)-a(49) from Robert A. Stump (bee_ess107(AT)yahoo.com), Jan 11 2002
"or -1 if ..." added to definition at the suggestion of Alexander Wajnberg by N. J. A. Sloane, Feb 02 2020

A133429 Records in A000230.

Original entry on oeis.org

2, 3, 7, 23, 89, 139, 199, 1831, 2477, 2971, 4297, 5591, 9551, 30593, 81463, 82073, 89689, 162143, 173359, 404597, 542603, 544279, 927869, 1100977, 1444309, 2238823, 5845193, 6752623, 6958667, 7621259, 10343761, 11981443, 13626257, 17983717, 49269581, 83751121
Offset: 1

Views

Author

N. J. A. Sloane, Nov 28 2007

Keywords

Crossrefs

A133430 Where records occur in A000230.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 8, 13, 14, 15, 16, 18, 19, 23, 28, 32, 33, 35, 37, 40, 44, 46, 47, 51, 54, 58, 62, 67, 70, 71, 72, 75, 78, 79, 83, 93, 97, 100, 112, 113, 114, 127, 128, 132, 139, 147, 149, 157, 158, 164, 167, 181, 184, 185, 194, 211, 218, 221, 226, 233, 235, 236, 241, 244
Offset: 1

Views

Author

N. J. A. Sloane, Nov 28 2007

Keywords

Crossrefs

A229030 Smallest of the first six consecutive primes that comprise three sets of primes with difference 2*n.

Original entry on oeis.org

5, 7, 251, 683, 2017, 18679, 13499, 608131, 97213, 937127, 891997, 531359, 490283, 637171, 892321, 21954731, 5995783, 3440627, 12024413, 3697249, 2674579, 95270633, 165066283, 25091659, 465512447, 161732947, 88360297, 804346451, 286775719, 198215821
Offset: 1

Views

Author

Arkadiusz Wesolowski, Sep 11 2013

Keywords

Comments

An equivalent definition of this sequence: smallest prime which gives a cluster of primes with the spacing pattern 2*n; x; 2*n; x; 2*n, x > 0.
A229033 gives the record values.

Examples

			Difference two - primes: 5, 7, 11, 13, 17, 19.
Difference four - primes: 7, 11, 13, 17, 19, 23.
Difference six - primes: 251, 257, 263, 269, 271, 277.
		

Crossrefs

Programs

  • Mathematica
    Table[With[{prs=Partition[Prime[Range[42000000]],6,1]},Select[prs, Union[ Take[ Differences[#1],{1,5,2}]]=={2n}&,1][[1,1]]],{n,30}] (* Harvey P. Dale, Apr 18 2014 *)

A229033 Record values in A229030.

Original entry on oeis.org

5, 7, 251, 683, 2017, 18679, 608131, 937127, 21954731, 95270633, 165066283, 465512447, 804346451
Offset: 1

Views

Author

Arkadiusz Wesolowski, Sep 11 2013

Keywords

Crossrefs

A229034 Indices of records in A229030.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 8, 10, 16, 22, 23, 25, 28
Offset: 1

Views

Author

Arkadiusz Wesolowski, Sep 11 2013

Keywords

Crossrefs

A348168 Segment the list of prime numbers into sublists L_1, L_2, ... with L_1 = {2} and L_n = {p_1, p_2, ..., p_a(n)}, where a(n) is the largest m such that for 0 < i < m, p_1 - prevprime(p_1) > p_2 - p_1 >= p_{i+1} - p_i.

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 1, 2, 4, 1, 2, 3, 2, 1, 6, 2, 2, 2, 1, 2, 1, 2, 2, 2, 1, 4, 2, 8, 1, 4, 2, 2, 1, 1, 5, 2, 1, 2, 2, 2, 1, 4, 6, 2, 2, 5, 8, 7, 2, 1, 1, 2, 10, 2, 2, 2, 2, 1, 4, 4, 2, 1, 5, 2, 1, 1, 2, 2, 2, 2, 1, 2, 2, 1, 4, 1, 1, 3, 2, 2, 3, 1, 2, 1, 2, 1, 2
Offset: 1

Views

Author

Ya-Ping Lu, Oct 03 2021

Keywords

Comments

The gap between two consecutive primes in L_n is smaller than g_{n-1} and g_n, where g_n is the gap between L_n and L_{n+1}. Sublists of length 2 are the most frequent ones and any pair of twin primes >= 11 stay in the same sublist.
Conjecture 1: lim_{n->oo} N_i/n = k_i, where N_i is the number of the first n sublists consisting of i primes and k_i is a constant, with k_2 > k_1 > k_3 > k_4 > ... .
Conjecture 2: lim_{n->oo} (Sum_{i=1..n} a(i))/n = Sum_{i=1..oo} i*k_i = e, meaning that, as n tends to infinity, the average length of sublists approaches 2.71828... (see the partial average - n plot in the links).
From Ya-Ping Lu, Apr 15 2024: (Start)
The distribution of sublists with 1, 2, 3, 4 and 5 primes and the number of primes in the first n sublists are given in the table below. k_i's as defined in Conjecture 1 are: k1 = 0.281, k2 = 0.431, k3 = 0.127, k4 = 0.058, and k5 = 0.031, approximately. Sublists with length <= 5 account for about 93% of the terms and 70% of the primes, as n approaches infinity.
n N_1 N_2 N_3 N_4 N_5 # of primes
---------- --------- --------- --------- -------- -------- -----------
1 1 0 0 0 0 1
10 6 3 0 1 0 16
100 33 44 5 9 3 232
1000 277 431 120 72 36 2617
10000 2821 4225 1243 642 331 27214
100000 28072 42929 12427 6059 3159 276081
1000000 279751 430299 126008 59729 32043 2747392
10000000 2804959 4303512 1264532 592726 317127 27426366
100000000 28070302 43078975 12686566 5869443 3143266 273972452
1000000000 280903920 431182582 127100032 58293618 31258182 2737643048
(End)

Examples

			See also the table of the sublists in the examples for A362017.
a(1) = 1 because L_1 = {2} by definition.
In the following examples we use p_0 to denote prevprime(p_1).
a(2) = 1. For the 2nd sublist, p_1 - p_0 = 3 - 2 = 1. If the next prime, 5, is in L_2, then p_2 - p_1 = 2 > p_1 - p_0. Therefore, 5 does not belong to L_2 and L_2 = {3}.
a(5) = 2. For the 5th sublist, p_1 - p_0 = 11 - 7 = 4. p_2 = 13 is in L_5 because p_2 - p_1 = 2 < p_1 - p_0. However, the next prime, 17, is not in L_5 as 17 - 13 > p_2 - p_1. Thus, L_5 = {11, 13}.
a(15) = 6. L_15 = {97, 101, 103, 107, 109, 113}, because p_1 - p_0 = 97-89 > p_2 - p_1 = 101-97 = 4, which is the maximum prime gap in L_15. 127, the prime after 113, is not in L_15 as 127-113 = 14 > p_2 - p_1.
		

Crossrefs

Cf. A362017 (first in each sublist), A087641, A226657, A001359, A023200.

Programs

  • Python
    from sympy import nextprime
    L = [2]
    for n in range(1, 100):
        print(len(L), end =', ')
        p0 = L[-1]; p1 = nextprime(p0); M = [p1]; g0 = p1 - p0; p = nextprime(p1); g1 = p - p1
        while g1 < g0 and p - p1 <= g1: M.append(p); p1 = p; p = nextprime(p)
        L = M

Extensions

Edited by Peter Munn, Jul 08 2025

A204669 Primes p such that q-p = 62, where q is the next prime after p.

Original entry on oeis.org

34061, 190409, 248909, 295601, 305147, 313409, 473027, 479639, 531731, 633497, 682079, 693881, 724331, 777479, 877469, 896201, 1011827, 1088309, 1137341, 1152527, 1179047, 1181777, 1190081, 1210289, 1216619, 1226117, 1272749, 1281587, 1286711, 1305449, 1343801, 1345361, 1357361, 1464179
Offset: 1

Views

Author

N. J. A. Sloane, Jan 17 2012

Keywords

Comments

All terms == 5 mod 6. - Zak Seidov, Jan 01 2013
There are no two consecutive primes in the sequence, while there are such primes p=prime(m) that q=prime(m+2) is also a term.
First such p's are at indices 554, 908, 1902, 2588, 3035, 5320, 6213, 6881, 7853, 8262, which correspond to 10237391, 15442121, 27374771, 36040469, 41216027, 66544301, 76313597, 83565611, 93112589, 97515359 (respectively). Note that a(554) = 10237391 = A226657(31). - Zak Seidov, Jul 01 2015
Primes p such that A013632(p) = 62. - Robert Israel, Jul 02 2015

Crossrefs

Programs

  • Magma
    [n: n in [2..2*10^6 ] | (NextPrime(n)-NextPrime(n-1)) eq 62]; // Vincenzo Librandi, Jul 02 2015
  • Maple
    p:= 2:
    count:= 0:
    while count < 40 do
      q:= nextprime(p);
      if q - p = 62 then
        count:= count+1;
        A[count]:= p;
      fi;
      p:= q;
    od:
    seq(A[i],i=1..count); # Robert Israel, Jul 02 2015
  • Mathematica
    Select[Prime@ Range@ 120000, NextPrime@ # - # == 62 &] (* Michael De Vlieger, Jul 01 2015 *)
    Select[Partition[Prime[Range[120000]],2,1],#[[2]]-#[[1]]==62&][[All,1]] (* Harvey P. Dale, Apr 01 2017 *)
  • PARI
    g=62;c=o=0;forprime(p=1,default(primelimit),(-o+o=p)==g&write("c:/temp/b204669.txt",c++" "p-g))  \\ M. F. Hasler, Jan 18 2012
    
Showing 1-10 of 10 results.