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.

A113274 Record gaps between twin primes.

Original entry on oeis.org

2, 6, 12, 18, 30, 36, 72, 150, 168, 210, 282, 372, 498, 630, 924, 930, 1008, 1452, 1512, 1530, 1722, 1902, 2190, 2256, 2832, 2868, 3012, 3102, 3180, 3480, 3804, 4770, 5292, 6030, 6282, 6474, 6552, 6648, 7050, 7980, 8040, 8994, 9312, 9318, 10200, 10338, 10668
Offset: 1

Views

Author

Bernardo Boncompagni, Oct 21 2005

Keywords

Comments

a(n) mod 6 = 0 for each n>1.

Examples

			The first twin primes are 3,5 and 5,7 so a(0)=5-3=2. The following pair is 11,13 so a(1)=11-5=6. The following pair is 17,19 so 6 remains the record and no terms are added.
		

Crossrefs

The smallest primes originating the sequence are given in A113275. Cf. A008407, A005250, A002386.

Programs

  • Mathematica
    NextLowerTwinPrim[n_] := Block[{k = n + 6}, While[ !PrimeQ[k] || !PrimeQ[k + 2], k+=6]; k]; p = 5; r = 2; t = {2}; Do[ q = NextLowerTwinPrim[p]; If[q > r + p, AppendTo[t, q - p]; Print[{p, q - p}]; r = q - p]; p = q, {n, 10^9}]; t (* Robert G. Wilson v, Oct 22 2005 *)
    DeleteDuplicates[Differences[Select[Partition[Prime[Range[10^7]],2,1],#[[2]]-#[[1]] == 2&][[All,2]]],GreaterEqual] (* The program generates the first 27 terms of the sequence. *) (* Harvey P. Dale, Dec 31 2022 *)

Formula

a(n) = A036063(n) + 2.
a(n) = A036062(n) - A113275(n).
From Alexei Kourbatov, Dec 29 2011: (Start)
(1) Upper bound: gaps between twin primes are smaller than 0.76*(log p)^3, where p is the prime at the end of the gap.
(2) Estimate for the actual size of the maximal gap that ends at p: maximal gap = a(log(p/a)-1.2), where a = 0.76*(log p)^2 is the average gap between twin primes near p, as predicted by the Hardy-Littlewood k-tuple conjecture.
Formulas (1) and (2) are asymptotically equal as p tends to infinity. However, (1) yields values greater than all known gaps, while (2) yields "good guesses" that may be either above or below the actual size of known maximal gaps.
Both formulas (1) and (2) are derived from the Hardy-Littlewood k-tuple conjecture via probability-based heuristics relating the expected maximal gap size to the average gap. Neither of the formulas has a rigorous proof (the k-tuple conjecture itself has no formal proof either). In both formulas, the constant ~0.76 is reciprocal to the twin prime constant 1.32032...
(End)

Extensions

More terms from Robert G. Wilson v, Oct 22 2005
Corrected terms based on A036063, cross-checked with independent computations by Carlos Rivera and Richard Fischer (linked).
Terms up to a(72) are given in Kourbatov (2013), terms up to a(75) in Oliveira e Silva website.

A052350 Least prime in A001359 (lesser of twin primes) such that the distance (A053319) to the next twin is 6*n.

Original entry on oeis.org

5, 17, 41, 617, 71, 311, 2267, 521, 1877, 461, 1721, 347, 1151, 1787, 3581, 2141, 6449, 1319, 21377, 1487, 12251, 4799, 881, 23057, 659, 19541, 12377, 2381, 38747, 10529, 37361, 8627, 9041, 33827, 5879, 80231, 15359, 45821, 36107, 14627, 37991, 36527, 87251, 70997
Offset: 1

Views

Author

Labos Elemer, Mar 07 2000

Keywords

Comments

Smallest distance (A052380) and also smallest possible increment of twin-distances is 6.
Primes may occur between p+2 and p+6n.
The prime a(n) determines a prime quadruple: [p, p+2, p+6n, p+6n+2] and a [2, 6n-2, 2] d-pattern.

Examples

			The first 3 terms (5, 17, 41) are followed by difference patterns as it is displayed: 5 by [2, 4, 2], 17 by [2, 4+6, 2], 41 by [2, 4+6+6, 2] determining prime quadruples: (5, 7, 11, 13), (17, 19, 29, 31) or (41, 43, 59, 61), respectively.
a(10) = 461 gives the quadruple [461, 463, 521 = 461+60, 523], and between 521 and 463, 7 primes occur.
		

Crossrefs

Programs

  • Mathematica
    NextLowerTwinPrim[n_] := Block[{k = n + 6}, While[ !PrimeQ[k] || !PrimeQ[k + 2], k += 6]; k];p = 5; t = Table[0, {50}]; Do[ q = NextLowerTwinPrim[p]; d = (q - p)/6; If[d < 51 && t[[d]] == 0, t[[d]] = p; Print[{d, p}]]; p = q, {n, 1500}]; t (* Robert G. Wilson v, Oct 28 2005 *)
  • PARI
    list(len) = {my(s = vector(len), c = 0, p1 = 5, q1 = 0, q2, d); forprime(p2 = 7, , if(p2 == p1 + 2, q2 = p1; if(q1 > 0, d = (q2 - q1)/6; if(d <= len && s[d] == 0, c++; s[d] = q1; if(c == len, return(s)))); q1 = q2); p1 = p2);} \\ Amiram Eldar, Mar 04 2025

Extensions

Name corrected by Amiram Eldar, Mar 04 2025

A036061 Increasing gaps among twin primes: the largest prime of the starting twin pair.

Original entry on oeis.org

5, 7, 19, 43, 73, 313, 349, 661, 2383, 5881, 13399, 18541, 24421, 62299, 187909, 687523, 688453, 850351, 2868961, 4869913, 9923989, 14656519, 17382481, 30752233, 32822371, 96894043, 136283431, 234966931, 248641039, 255949951, 390817729, 698542489, 2466641071
Offset: 1

Views

Author

Keywords

Comments

Has many terms in common with A054691, but neither of the two is a subsequence of the other one. - M. F. Hasler, May 07 2022

Crossrefs

Programs

  • Mathematica
    Block[{s = Select[Partition[Prime@ Range[10^7], 2, 1], Subtract @@ # == -2 &][[All, -1]], t}, t = Differences@ s; Map[s[[FirstPosition[t, #]]] &, Union@ FoldList[Max, t]][[All, 1]]] (* Michael De Vlieger, Jan 18 2019 *)

Formula

a(n) = A036062(n) - A036063(n).
a(n) = A113275(n) + 2.

Extensions

Terms 5, 7 prepended by Max Alekseyev, Nov 05 2015
a(17) corrected and a(31)-a(33) from Sean A. Irvine, Oct 21 2020

A036062 Increasing gaps among twin primes: the smallest prime of the second twin pair.

Original entry on oeis.org

5, 11, 29, 59, 101, 347, 419, 809, 2549, 6089, 13679, 18911, 24917, 62927, 188831, 688451, 689459, 851801, 2870471, 4871441, 9925709, 14658419, 17384669, 30754487, 32825201, 96896909, 136286441, 234970031, 248644217, 255953429
Offset: 1

Views

Author

Keywords

Crossrefs

Formula

a(n) = A036061(n) + A036063(n).

Extensions

Terms a(3)-a(41) are given by Rathbun (1998).
Corrected by Jud McCranie, Jan 04 2001
Terms up to a(72) are listed in Kourbatov (2013), terms up to a(75) on Oliveira e Silva's website, added by Max Alekseyev, Nov 06 2015

A340573 a(n) is the smallest lesser twin prime p from A001359 such that the distance to the previous lesser twin prime is 6*n.

Original entry on oeis.org

11, 29, 59, 641, 101, 347, 2309, 569, 1931, 521, 1787, 419, 1229, 1871, 3671, 2237, 6551, 1427, 21491, 1607, 12377, 4931, 1019, 23201, 809, 19697, 12539, 2549, 38921, 10709, 37547, 8819, 9239, 34031, 6089, 80447, 15581, 46049, 36341, 14867, 38237, 36779, 87509, 71261, 15137, 40427, 13679, 54917, 41141, 50891
Offset: 1

Views

Author

Artur Jasinski, Jan 12 2021

Keywords

Comments

Lesser twin primes (with the exception of prime 3) are congruent to 5 modulo 6, which implies that distances between successive pairs of twin primes are 6*k.

Examples

			a(1)=11 because 11 - 5 = 6*1.
a(2)=41 because 41 - 29 = 6*2.
a(3)=59 because 59 - 41 = 6*3.
		

Crossrefs

Programs

  • Mathematica
    Table[a[n] = 0, {n, 1, 10000}]; Table[
    b[n] = 0, {n, 1, 10000}]; qq = {}; prev = 5; Do[
    If[Prime[n + 1] - Prime[n] == 2, k = (Prime[n] - prev)/6;
      If[b[k] == 0, a[k] = Prime[n]; b[k] = 1]; prev = Prime[n]], {n, 5,
      10000}]; list = Table[a[n], {n, 1, 50}]
    (* Second program: *)
    pp = Select[Prime[Range[10^4]], PrimeQ[#+2]&];
    dd = Differences[pp];
    a[n_] := pp[[FirstPosition[dd, 6n][[1]]+1]];
    Array[a, 50] (* Jean-François Alcover, Jan 13 2021 *)

Formula

a(n) = A052350(n) + 6*n.
Showing 1-5 of 5 results.