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.

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

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

A052358 Least prime in A031936 (lesser of 18-twins) whose distance to the next 18-twin is 2*n.

Original entry on oeis.org

20183, 20963, 14011, 26759, 7433, 45613, 4703, 21911, 26539, 18233, 6581, 4423, 7351, 37379, 55903, 25801, 4373, 6529, 35879, 119993, 22171, 12923, 10691, 52609, 14303, 20201, 16231, 21121, 103049, 17863, 6451, 34439, 50341, 76129, 3803, 23251, 15241, 14369
Offset: 9

Views

Author

Labos Elemer, Mar 07 2000

Keywords

Comments

The smallest distance between 18-twins [A052380(9)] is 18 and its minimal increment is 2.
a(n) = p is the first prime initiating [p, p+18, p+2n, p+2n+18] prime and [18, 2n-18, 18] d-pattern.

Examples

			a(11) = 14011 initiates prime quadruple [14011, 14029, 14033, 14051] and difference pattern [18, 4, 18].
a(15) = 4703 specifies prime quadruple  [4703, 4721, 4133, 4151] which includes 2 primes (4723, 4729) in the center, and difference pattern [18, 28, 18].
		

Crossrefs

Programs

  • Mathematica
    seq[m_] := Module[{p = Prime[Range[m]], d, i, pp, dd, j}, d = Differences[p]; i = Position[d, 18] // Flatten; pp = p[[i]]; dd = Differences[pp]/2 - 8; j = TakeWhile[FirstPosition[dd, #] & /@ Range[Max[dd]] // Flatten, ! MissingQ[#] &]; pp[[j]]]; seq[12000] (* 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 + 18, q2 = p1; if(q1 > 0, d = (q2 - q1)/2 - 8; 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

a(21) corrected and missing terms inserted by Sean A. Irvine, Nov 07 2021
Name and offset corrected by Amiram Eldar, Mar 05 2025

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

A052351 Least prime in A023200 (lesser of 4-twins) such that the distance to the next 4-twin is 6*n.

Original entry on oeis.org

7, 67, 19, 43, 163, 127, 397, 229, 769, 1489, 673, 9547, 1009, 1783, 1693, 2857, 11677, 23869, 499, 1093, 4003, 28657, 10459, 29383, 12487, 6043, 41647, 7039, 17029, 19207, 15073, 24247, 65839, 29629, 18583, 9883, 66697, 100699, 7243, 53923, 82237, 6217, 76249
Offset: 1

Views

Author

Labos Elemer, Mar 07 2000

Keywords

Comments

a(n) is a "lesser of a 4-twin" prime whose distance to the next twin is 6n.
Both the smallest distance (A052380) and its increment for 4-twins is 6.
The prime a(n)=p is the first which determines a prime quadruple [p, p+4, p+6n, p+6n+4] and difference pattern of [4, 6n-4, 4].

Examples

			a(1) = 7 gives [7, 11,7+6 = 13, 17] with no primes between 11 and 13.
a(5) = 163 specifies [163, 167, 163+30 = 191, 193] with 4 primes between 167 and 193.
		

Crossrefs

Programs

  • Mathematica
    seq[m_] := Module[{p = Prime[Range[m]], d, i, pp, dd, j}, d = Differences[p]; i = Position[d, 4] // Flatten; pp = p[[i]]; dd = Differences[pp]/6; j = TakeWhile[FirstPosition[dd, #] & /@ Range[Max[dd]] // Flatten, ! MissingQ[#] &]; pp[[j]]]; seq[10000] (* Amiram Eldar, Mar 04 2025 *)
  • PARI
    list(len) = {my(s = vector(len), c = 0, p1 = 7, q1 = 0, q2, d); forprime(p2 = 11, , if(p2 == p1 + 4, 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

A052352 Least prime in A031924 (lesser of 6-twins) such that the distance to the next 6-twin is 2*n.

Original entry on oeis.org

47, 23, 73, 61, 353, 31, 233, 131, 331, 653, 2441, 3733, 1033, 4871, 1063, 1621, 503, 607, 4211, 7823, 2287, 83, 383, 1231, 2903, 5981, 1123, 173, 11981, 11833, 1367, 2063, 4723, 19681, 2207, 2131, 2713, 9533, 6571, 1657, 23081, 15913, 7013, 14051, 9967, 22447
Offset: 3

Views

Author

Labos Elemer, Mar 07 2000

Keywords

Comments

The increment of distance of 6-twins (A053321) is 2 (not 6), the smallest distance (A052380) is 6.
The middle gap 2n-6 may include primes, e.g., n = 12, a(12) = 653 and between 659 and 659 + 2*12 - 6 = 677, two primes occur (661 and 673).
a(n) = p yields a prime quadruple [p, p+6, p+2n, p+2n+6] with difference pattern [6, 2n-6, 6].

Examples

			For n = 3, 4, 5,  the quadruples are [47, 53, 53, 59] (a triple), [23, 29, 31, 37], [73, 79, 83, 89] with 53 - 47 = 6, 31 - 23 = 8 and 83 - 73 = 10 twin distances.
		

Crossrefs

Programs

  • Mathematica
    seq[m_] := Module[{p = Prime[Range[m]], d, i, pp, dd, j}, d = Differences[p]; i = Position[d, 6] // Flatten; pp = p[[i]]; dd = Differences[pp]/2 - 2; j = TakeWhile[FirstPosition[dd, #] & /@ Range[Max[dd]] // Flatten, ! MissingQ[#] &]; pp[[j]]]; seq[10000] (* Amiram Eldar, Mar 04 2025 *)
  • PARI
    list(len) = {my(s = vector(len), c = 0, p1 = 2, q1 = 0, q2, d); forprime(p2 = 11, , if(p2 == p1 + 6, q2 = p1; if(q1 > 0, d = (q2 - q1)/2 - 2; 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 and offset corrected by Amiram Eldar, Mar 04 2025

A052353 Least prime in A031926 (lesser of 8-twins) whose distance to the next 8-twin is 6*n.

Original entry on oeis.org

389, 683, 719, 359, 1523, 2699, 401, 929, 2153, 1373, 2459, 2531, 1439, 1733, 8573, 2741, 4943, 9059, 5051, 983, 3491, 9173, 7529, 761, 1823, 1571, 3041, 5399, 1193, 2273, 491, 8171, 23549, 5189, 5813, 53189, 3221, 4349, 32789, 49823, 18749, 19001, 10979, 89, 19433
Offset: 2

Views

Author

Labos Elemer, Mar 07 2000

Keywords

Comments

The smallest distance [A052380(4)] between 8-twins is 12, while its minimal increment is 6.
a(n) = p yields a prime quadruple of [p, p+8, p+6n, p+6n+8] and difference pattern of [8, 6n-8, 8].

Examples

			a(2) = 389 specifies quadruple of [389, 397, 401, 409] with no prime between 397 and 401;
a(11) = 1373 gives quadruple of [1373, 1381, 1439, 1447] and [8, 58, 8] difference pattern with 6 primes in the central gap.
		

Crossrefs

Programs

  • Mathematica
    seq[m_] := Module[{p = Prime[Range[m]], d, i, pp, dd, j}, d = Differences[p]; i = Position[d, 8] // Flatten; pp = p[[i]]; dd = Differences[pp]/6 - 1; j = TakeWhile[FirstPosition[dd, #] & /@ Range[Max[dd]] // Flatten, ! MissingQ[#] &]; pp[[j]]]; seq[10000] (* 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 + 8, q2 = p1; if(q1 > 0, d = (q2 - q1)/6 - 1; 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

Name and offset corrected by Amiram Eldar, Mar 05 2025

A052355 Least prime in A031930 (lesser of 12-twins) whose distance to the next 12-twin is 2*n.

Original entry on oeis.org

199, 7937, 3331, 3049, 1511, 1789, 28607, 7001, 20599, 2069, 18257, 46477, 1201, 15569, 1459, 467, 23087, 23041, 2399, 6101, 7057, 6607, 23801, 3931, 3499, 9029, 5197, 7841, 3191, 1237, 3259, 45767, 4801, 1811, 1709, 40867, 23497, 125441, 5419, 3989, 18077, 21787
Offset: 6

Views

Author

Labos Elemer, Mar 07 2000

Keywords

Comments

The smallest distance between 12-twins [A052380(6)] is 12 and its minimal increment is 2.
a(n) = p specifies a quadruple [p, p+12, p+2n, p+2n+12] with difference pattern of [12, 2n-12, 12].

Examples

			a(7) = 7937 results in [7937, 7949, 7951, 7963] quadruple and [12, 2, 12] difference pattern.
a(10) = 1511 specifies [1511, 1523, 1531, 1543] quadruple and [12, 8, 12] difference pattern without prime in the central gap.
		

Crossrefs

Programs

  • Mathematica
    seq[m_] := Module[{p = Prime[Range[m]], d, i, pp, dd, j}, d = Differences[p]; i = Position[d, 12] // Flatten; pp = p[[i]]; dd = Differences[pp]/2 - 5; j = TakeWhile[FirstPosition[dd, #] & /@ Range[Max[dd]] // Flatten, ! MissingQ[#] &]; pp[[j]]]; seq[1q000] (* 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 + 12, q2 = p1; if(q1 > 0, d = (q2 - q1)/2 - 5; 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

Name and offset corrected by Amiram Eldar, Mar 05 2025

A052356 Least prime in A031932 (lesser of 14-twins) whose distance to the next 14-twin is 6*n.

Original entry on oeis.org

24749, 293, 3833, 21467, 23417, 14159, 3779, 18353, 773, 4817, 18959, 2939, 863, 7607, 3677, 8039, 5939, 2633, 7727, 13367, 51839, 51659, 7043, 5153, 8447, 26189, 1409, 113, 7853, 1847, 13859, 43223, 2423, 24533, 65867, 50909, 19763, 15173, 15527, 86477, 55229
Offset: 3

Views

Author

Labos Elemer, Mar 07 2000

Keywords

Comments

The smallest distance between 14-twins [A052380(7)] is 18 and its minimal increment is 6.
a(n) = p is the first prime initiating [p, p+14, p+6n, p+6n+14] quadruple and prime difference pattern of [14, 6n-14, 14].

Examples

			n = 4 results in [293,307,317,331] primes pattern and [14,24,14] difference pattern with 2 further primes (311 and 313) in the central gap.
		

Crossrefs

Programs

  • Mathematica
    seq[m_] := Module[{p = Prime[Range[m]], d, i, pp, dd, j}, d = Differences[p]; i = Position[d, 14] // Flatten; pp = p[[i]]; dd = Differences[pp]/6 - 2; j = TakeWhile[FirstPosition[dd, #] & /@ Range[Max[dd]] // Flatten, ! MissingQ[#] &]; pp[[j]]]; seq[10000] (* 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 + 14, q2 = p1; if(q1 > 0, d = (q2 - q1)/6 - 2; 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

Name and offset corrected by Amiram Eldar, Mar 05 2025

A052357 Least prime in A031934 (lesser of 16-twins) whose distance to the next 16-twin is 6*n.

Original entry on oeis.org

3373, 32917, 2221, 13597, 3391, 37783, 4057, 13537, 8581, 41911, 6763, 7333, 10867, 12457, 1831, 2113, 14683, 37201, 6637, 17581, 25423, 37447, 11353, 11197, 20611, 22453, 57397, 1933, 50707, 37591, 11503, 39733, 2593, 122131, 22921, 9013, 17167, 10273, 9661
Offset: 3

Views

Author

Labos Elemer, Mar 07 2000

Keywords

Comments

The smallest distance between 16-twins [A052380(8)] is 18 and its minimal increment is 6.
a(n) = p is the smallest prime introducing the prime quadruple [p, p+16, p+6n, p+6n+16], which has a difference pattern [16, 6n-16, 16].

Examples

			a(9) = p = 4057 gives [4057, 4073, 4111, 4127] quadruple and [16, 38, 16] distance pattern with 4 primes in the medial gap.
		

Crossrefs

Programs

  • Mathematica
    seq[m_] := Module[{p = Prime[Range[m]], d, i, pp, dd, j}, d = Differences[p]; i = Position[d, 16] // Flatten; pp = p[[i]]; dd = Differences[pp]/6 - 2; j = TakeWhile[FirstPosition[dd, #] & /@ Range[Max[dd]] // Flatten, ! MissingQ[#] &]; pp[[j]]]; seq[12000] (* 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 + 16, q2 = p1; if(q1 > 0, d = (q2 - q1)/6 - 2; 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

Incorrect 43207 removed and more terms from Sean A. Irvine, Nov 06 2021
Name and offset corrected by Amiram Eldar, Mar 05 2025
Showing 1-10 of 10 results.