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 15 results. Next

A052359 Least prime in A031938 (lesser of primes differing by 20) whose distance to the next 20-twin is 6*n.

Original entry on oeis.org

46703, 37223, 65147, 20369, 63929, 71999, 11597, 11027, 99767, 93503, 5903, 14087, 115163, 24821, 104891, 24923, 11867, 53381, 65657, 93581, 99623, 11447, 18461, 126761, 32213, 27653, 72797, 5717, 154247, 54449, 27827, 10223, 56747, 18617, 13421, 10433, 8543, 60107
Offset: 4

Views

Author

Labos Elemer, Mar 07 2000

Keywords

Comments

The smallest distance between 20-twins is 24 [= A052380(10)], while its minimal increment is 6.
a(n) = p starts [p, p+20, p+6n, p+6n+20] and [20, 6n-20, 20] patterns of primes and their difference.
a(n) = p is the smallest prime which starts a [p, p+20] twin followed by the next [p+6n, p+6n+20] twin.

Examples

			For n = 4, a(4) = 46703 results in prime quadruple [46703, 46723, 46727, 46747] and difference pattern [20, 4, 20].
For n = 14, a(14) = 5903 yields prime quadruple [5903, 5923, 5987, 6007] with 4 primes in the medial gap, and difference pattern [20, 64, 20].
		

Crossrefs

Programs

  • Mathematica
    seq[m_] := Module[{p = Prime[Range[m]], d, i, pp, dd, j}, d = Differences[p]; i = Position[d, 20] // Flatten; pp = p[[i]]; dd = Differences[pp]/6 - 3; j = TakeWhile[FirstPosition[dd, #] & /@ Range[Max[dd]] // Flatten, ! MissingQ[#] &]; pp[[j]]]; seq[15000] (* Amiram Eldar, Mar 05 2025 *)
  • PARI
    list(len) = {my(s = vector(len), c = 0, p1 = 2, q1 = 0, q2, d); forprime(p2 = 3, , if(p2 == p1 + 20, q2 = p1; if(q1 > 0, d = (q2 - q1)/6 - 3; if(d <= len && s[d] == 0, c++; s[d] = q1; if(c == len, return(s)))); q1 = q2); p1 = p2);} \\ Amiram Eldar, Mar 05 2025

Extensions

Offset changed to 1 by Michel Marcus, Apr 30 2019
Name and offset corrected by Amiram Eldar, Mar 05 2025

A053331 First differences of A031938.

Original entry on oeis.org

750, 1452, 324, 534, 1770, 186, 84, 816, 846, 594, 300, 240, 84, 390, 966, 210, 234, 360, 66, 84, 270, 150, 60, 210, 120, 1140, 294, 228, 438, 90, 1296, 1470, 576, 288, 342, 312, 156, 222, 822, 708, 42, 816, 1284, 276, 186, 1230, 348, 270, 102, 114, 90
Offset: 1

Views

Author

Labos Elemer, Mar 06 2000

Keywords

Crossrefs

Cf. A031938.

Programs

  • Mathematica
    Differences@ Prime@ Flatten@ Position[Differences@ Prime@ Range[3000], 20] (* Michael De Vlieger, Aug 16 2017 *)

A052380 a(n) = D is the smallest distance (D) between 2 non-overlapping prime twins differing by d=2n; these twins are [p,p+d] or [p+D,p+D+d] and p > 3.

Original entry on oeis.org

6, 6, 6, 12, 12, 12, 18, 18, 18, 24, 24, 24, 30, 30, 30, 36, 36, 36, 42, 42, 42, 48, 48, 48, 54, 54, 54, 60, 60, 60, 66, 66, 66, 72, 72, 72, 78, 78, 78, 84, 84, 84, 90, 90, 90, 96, 96, 96, 102, 102, 102, 108, 108, 108, 114, 114, 114, 120, 120, 120, 126, 126, 126, 132
Offset: 1

Views

Author

Labos Elemer, Mar 13 2000

Keywords

Comments

For d=D the quadruple of primes becomes a triple: [p,p+d],[p+d,p+2d].
Without the p > 3 condition, a(1)=2.
The starter prime p, is followed by a prime d-pattern of [d,D-d,d], where D-d=a(n)-2n is 4,2 or 0; these d-patterns are as follows: [2,4,2], [4,2,4], [6,6], [8,4,8], [10,2,10], [12,12], etc.
All terms of this sequence have digital root 3, 6 or 9. - J. W. Helkenberg, Jul 24 2013
a(n+1) is also the number of the circles added at the n-th iteration of the pattern generated by the construction rules: (i) At n = 0, there are six circles of radius s with centers at the vertices of a regular hexagon of side length s. (ii) At n > 0, draw a circle with center at each boundary intersection point of the figure of the previous iteration. The pattern seems to be the flower of life except at the central area. See illustration. - Kival Ngaokrajang, Oct 23 2015

Examples

			n=5, d=2n=10, the minimal distance for 10-twins is 12 (see A031928, d=10) the smallest term in A053323. It occurs first between twins of [409,419] and [421,431]; see 409 = A052354(1) = A052376(1) = A052381(5).
		

Crossrefs

Programs

  • Mathematica
    Table[2 n + 4 - 2 Mod[n + 2, 3], {n, 66}] (* Michael De Vlieger, Oct 23 2015 *)
  • PARI
    vector(200, n, n--; 6*(n\3+1)) \\ Altug Alkan, Oct 23 2015

Formula

a(n) = 6*ceiling(n/3) = 6*ceiling(d/6) = D = D(n).
a(n) = 2n + 4 - 2((n+2) mod 3). - Wesley Ivan Hurt, Jun 30 2013
a(n) = 6*A008620(n-1). - Kival Ngaokrajang, Oct 23 2015

A098974 Primes p such that q-p = 24, where q is the next prime after p.

Original entry on oeis.org

1669, 2179, 4177, 4523, 4759, 5237, 6173, 6397, 6737, 7079, 7369, 7793, 8123, 8329, 9067, 11003, 11633, 11839, 12073, 12119, 13009, 13267, 16033, 16193, 16453, 16763, 16787, 17053, 17683, 17989, 18593, 18637, 19183, 19507, 20483, 22409, 22877, 23227
Offset: 1

Views

Author

Douglas Winston (douglas.winston(AT)srupc.com), Oct 23 2004

Keywords

Comments

Lower prime of a difference of 24 between consecutive primes.
23 successive numbers after prime number p are composite. - Artur Jasinski, Jan 15 2007

Crossrefs

Programs

  • Mathematica
    a = {}; Do[If[Prime[x + 1] - Prime[x] == 24, AppendTo[a, Prime[x]]], {x, 1, 10000}]; a (* Artur Jasinski, Jan 15 2007 *)

Extensions

Entry revised by N. J. A. Sloane, Feb 13 2007

A126784 Primes p such that q-p = 32, where q is the next prime after p.

Original entry on oeis.org

5591, 10799, 27701, 27851, 33647, 39047, 41081, 41687, 43721, 44417, 45989, 47459, 50789, 52457, 55259, 55547, 61781, 62351, 64817, 66239, 67307, 69959, 73907, 79907, 80567, 82307, 84089, 88037, 94169, 94961, 99191, 99929, 100559, 102611
Offset: 1

Views

Author

Douglas Winston (douglas.winston(AT)srupc.com), Feb 24 2007

Keywords

Comments

Lower prime of a difference of 32 between consecutive primes.

Crossrefs

Programs

  • PARI
    lista(nn) = {p = 2; while (p < nn, q = nextprime(p+1); if (q - p == 32, print1(p, ", ")); p = q;);} \\ Michel Marcus, Jul 17 2013

A290450 Primes with property that the next prime has the same last digit.

Original entry on oeis.org

139, 181, 241, 283, 337, 409, 421, 547, 577, 631, 691, 709, 787, 811, 829, 887, 919, 1021, 1039, 1051, 1153, 1171, 1249, 1399, 1471, 1627, 1637, 1699, 1723, 1801, 1879, 2017, 2029, 2053, 2089, 2143, 2521, 2647, 2719, 2731, 2767, 2887, 2917, 3001, 3089, 3109, 3361, 3413, 3517, 3547, 3571
Offset: 1

Views

Author

Alonso del Arte, Aug 06 2017

Keywords

Comments

Starts off the same as A031928, primes p such that the next prime is p + 10. First term that differs is 887, since 897 = 3 * 13 * 23 and the next prime is 907.
As the primes get larger and more sparsely distributed, the difference between successive primes is less likely to be less than 10.
One might expect that a prime is 1/4 as likely to be followed by a prime with the same least significant digit in base 10 (since the possibilities are 1, 3, 7, 9).
One might also expect this sequence to consist of a quarter of the primes. And yet pi(a(50)) = pi(3547) = 497; the 200th prime is 1223.

Examples

			139 is in the sequence because the immediately following prime is 149, which also ends in 9.
But 149 is not in the sequence because the next prime after that one is 151, which ends in 1, not 9.
		

Crossrefs

Cf. A031928 (subset), A050434 (with 2 digits).

Programs

  • Magma
    f:=func; a:=[]; for p in PrimesUpTo(4000) do if f(p,1) or f(p,3) or f(p,7) or f(p,9) then Append(~a,p); end if; end for; a; // Marius A. Burtea, Oct 16 2019
  • Mathematica
    Select[Partition[Prime[Range[1000]], 2, 1], Mod[#[[1]], 10] == Mod[#[[2]], 10] &][[All, 1]] (* Harvey P. Dale, Aug 21 2017 *)
    Module[{nn=1000,prs,p},prs=Prime[Range[nn]];p=Divisible[#,10]&/@ Differences[prs];Pick[Most[prs],p]] (* Harvey P. Dale, Aug 22 2017 *)

Formula

A031928 UNION A031938 UNION A124596 UNION A126721 UNION ... - R. J. Mathar, Jan 23 2022

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

A320708 Indices of primes followed by a gap (distance to next larger prime) of 20.

Original entry on oeis.org

154, 259, 442, 480, 548, 753, 777, 783, 876, 971, 1035, 1066, 1095, 1106, 1147, 1254, 1277, 1302, 1337, 1345, 1355, 1381, 1396, 1400, 1423, 1438, 1562, 1592, 1613, 1662, 1669, 1808, 1955, 2016, 2043, 2081, 2116, 2129, 2147, 2226, 2302, 2307, 2387, 2517, 2547, 2563, 2694, 2724, 2745, 2755, 2766
Offset: 1

Views

Author

M. F. Hasler, Oct 19 2018

Keywords

Comments

Indices of the primes listed in A031938.

Crossrefs

Equals A000720 o A031938.
Row 10 of A174349.
Subsequence of A107730 (prime(n+1) ends in same digit as prime(n)).
Indices of 20's in A001223.
Cf. A029707, A029709, A320701, A320702, ..., A320720 (analog for gaps 2, 4, 6, 8, ..., 44), A116493 (gap 70), A116496 (gap 100), A116497 (gap 200), A116495 (gap 210).

Programs

  • Magma
    [n: n in [1..3000] | NthPrime(n+1) - NthPrime(n) eq 20]; // Vincenzo Librandi, Mar 22 2019
  • Mathematica
    Select[Range[3000], Prime[#] + 20 == Prime[# + 1] &] (* Vincenzo Librandi, Mar 22 2019 *)
  • PARI
    A(N=100,g=20,p=2,i=primepi(p)-1,L=List())={forprime(q=1+p,,i++; if(p+g==p=q, listput(L,i); N--||break));Vec(L)} \\ returns the list of first N terms of the sequence
    

Formula

a(n) = A000720(A031938(n)).
A320708 = { i > 0 | prime(i+1) = prime(i) + 20 } = A001223^(-1)({20}).

A174350 Square array: row n >= 1 lists the primes p for which the next prime is p+2n; read by antidiagonals.

Original entry on oeis.org

3, 5, 7, 11, 13, 23, 17, 19, 31, 89, 29, 37, 47, 359, 139, 41, 43, 53, 389, 181, 199, 59, 67, 61, 401, 241, 211, 113, 71, 79, 73, 449, 283, 467, 293, 1831, 101, 97, 83, 479, 337, 509, 317, 1933, 523, 107, 103, 131, 491, 409, 619, 773, 2113, 1069, 887
Offset: 1

Views

Author

Clark Kimberling, Mar 16 2010

Keywords

Comments

Every odd prime p = prime(i), i > 1, occurs in this array, in row (prime(i+1) - prime(i))/2. Polignac's conjecture states that each row contains an infinite number of indices. In case this does not hold, we can use the convention to continue finite rows with 0's, to ensure the sequence is well defined. - M. F. Hasler, Oct 19 2018
A permutation of the odd primes (A065091). - Robert G. Wilson v, Sep 13 2022

Examples

			Upper left hand corner of the array:
     3     5    11    17    29    41    59    71   101 ...
     7    13    19    37    43    67    79    97   103 ...
    23    31    47    53    61    73    83   131   151 ...
    89   359   389   401   449   479   491   683   701 ...
   139   181   241   283   337   409   421   547   577 ...
   199   211   467   509   619   661   797   997  1201 ...
   113   293   317   773   839   863   953  1409  1583 ...
  1831  1933  2113  2221  2251  2593  2803  3121  3373 ...
   523  1069  1259  1381  1759  1913  2161  2503  2861 ...
  (...)
Row 1: p(2) = 3, p(3) = 5, p(5) = 11, p(7) = 17,... these being the primes for which the next prime is 2 greater: (lesser of) twin primes A001359.
Row 2: p(4) = 7, p(6) = 13, p(8) = 19,... these being the primes for which the next prime is 4 greater: (lesser of) cousin primes A029710.
		

Crossrefs

Rows 35, 40, 45, 50, ...: A204792, A126722, A204764, A050434 (row 50), A204801, A204672, A204802, A204803, A126724 (row 75), A184984, A204805, A204673, A204806, A204807 (row 100); A224472 (row 150).
Column 1: A000230.
Column 2: A046789.

Programs

  • Mathematica
    rows = 10; t2 = {}; Do[t = {}; p = Prime[2]; While[Length[t] < rows - off + 1, nextP = NextPrime[p]; If[nextP - p == 2*off, AppendTo[t, p]]; p = nextP]; AppendTo[t2, t], {off, rows}]; Table[t2[[b, a - b + 1]], {a, rows}, {b, a}] (* T. D. Noe, Feb 11 2014 *)
    t[r_, 0] = 2; t[r_, c_] := Block[{p = NextPrime@ t[r, c - 1], q}, q = NextPrime@ p; While[ p + 2r != q, p = q; q = NextPrime@ q]; p]; Table[ t[r - c + 1, c], {r, 10}, {c, r, 1, -1}] (* Robert G. Wilson v, Nov 06 2020 *)
  • PARI
    A174350_row(g, N=50, i=0, p=prime(i+1), L=[])={g*=2; forprime(q=1+p, , i++; if(p+g==p=q, L=concat(L, q-g); N--||return(L)))} \\ Returns the first N terms of row g. - M. F. Hasler, Oct 19 2018

Formula

a(n) = A000040(A174349(n)). - Michel Marcus, Mar 30 2016

Extensions

Definition corrected and other edits by M. F. Hasler, Oct 19 2018

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.
Showing 1-10 of 15 results. Next