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.

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

A309066 Integers m such that A053319(m) is a term in A014574.

Original entry on oeis.org

2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 21, 22, 23, 24, 26, 27, 29, 30, 31, 32, 33, 35, 36, 37, 38, 39, 40, 43, 44, 45, 46, 48, 49, 51, 53, 57, 59, 61, 63, 65, 66, 68, 69, 70, 71, 73, 75, 77, 78, 79, 81, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95
Offset: 1

Views

Author

Dmitry Kamenetsky, Jul 10 2019

Keywords

Examples

			A053319(2) = 6 and 6 is in A014574, so a(1) = 2.
A053319(3) = 6 and 6 is in A014574, so a(2) = 3.
A053319(4) = 12 and 12 is in A014574, so a(3) = 4.
		

Crossrefs

Programs

  • Mathematica
    tpmidQ[n_] := And @@ PrimeQ[n + {-1, 1}]; ind = 0; tp = {4}; s = {}; Do[If[ tpmidQ[n], ind++; If[tpmidQ[n - tp[[-1]]], AppendTo[s, ind]]; AppendTo[tp, n]], {n, 6, 10^4}]; s (* Amiram Eldar, Jul 12 2019 *)

A309067 Index of A053319(n) in A014574; -1 if it doesn't exist.

Original entry on oeis.org

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

Views

Author

Dmitry Kamenetsky, Jul 10 2019

Keywords

Crossrefs

Programs

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

A144834 Numbers n such that the two numbers n+1 and n+3 are both prime.

Original entry on oeis.org

2, 4, 10, 16, 28, 40, 58, 70, 100, 106, 136, 148, 178, 190, 196, 226, 238, 268, 280, 310, 346, 418, 430, 460, 520, 568, 598, 616, 640, 658, 808, 820, 826, 856, 880, 1018, 1030, 1048, 1060, 1090, 1150, 1228, 1276, 1288, 1300, 1318, 1426, 1450, 1480, 1486, 1606
Offset: 1

Views

Author

Giovanni Teofilatto, Sep 22 2008

Keywords

Comments

1 less than the lesser of each twin prime pair. [Harvey P. Dale, Nov 08 2011]

Crossrefs

Cf. A053319 (first differences).

Programs

  • Mathematica
    Transpose[Select[Partition[Prime[Range[300]],2,1],Last[#]-First[#] == 2&]][[1]]-1 (* Harvey P. Dale, Nov 08 2011 *)

Formula

a(n) = A014574(n)-2 = A001359(n)-1. - R. J. Mathar, Sep 24 2008

Extensions

Definition edited and extended by R. J. Mathar, Sep 24 2008

A270535 Integers k such that A001359(k) + A001359(k+3) = A001359(k+1) + A001359(k+2).

Original entry on oeis.org

5, 8, 10, 11, 15, 16, 17, 27, 36, 68, 69, 71, 111, 132, 189, 200, 212, 214, 234, 252, 262, 279, 317, 332, 343, 344, 364, 424, 426, 500, 506, 518, 520, 543, 563, 577, 606, 620, 658, 672, 696, 697, 737, 766, 882, 907, 982, 1009, 1064, 1087, 1089, 1091, 1162, 1164, 1172, 1226, 1256, 1268
Offset: 1

Views

Author

Altug Alkan, Mar 18 2016

Keywords

Comments

Integers k such that A006512(k) + A006512(k+3) = A006512(k+1) + A006512(k+2).
Integers k such that A014574(k) + A014574(k+3) = A014574(k+1) + A014574(k+2).

Examples

			5 is a term because A001359(5) = 29, A001359(6) = 41, A001359(7) = 59, A001359(8) = 71 and 29 + 71 = 41 + 59.
		

Crossrefs

Programs

  • Mathematica
    s = Select[Prime@ Range[10^6], PrimeQ[# + 2] &]; Select[Range@ 1300, s[[#]] + s[[# + 3]] == s[[# + 1]] + s[[# + 2]] &] (* after Robert G. Wilson v at A001359 *)
  • PARI
    t(n, p=3) = { while( p+2 < (p=nextprime( p+1 )) || n-->0, ); p-2}
    b(n) = t(n) + t(n+3) - t(n+1) - t(n+2);
    for(n=1, 2000, if(b(n) == 0, print1(n, ", ")));
    
  • PARI
    list(lim) = {my(k = 0, p1 = 2, t = [0, 0, 0, 0]); forprime(p2 = 3, lim, if(p2 - p1 == 2, k++; t = concat(t[2..4], p1); if(t[1] + t[4] == t[2] + t[3], print1(k-3, ", "))); p1 = p2);} \\ Amiram Eldar, Feb 22 2025

A175668 First differences of A175648.

Original entry on oeis.org

4, 11, 1, 12, 1, 16, 7, 7, 17, 5, 4, 20, 4, 3, 1, 10, 12, 1, 13, 28, 18, 1, 3, 4, 4, 1, 1, 2, 32, 25, 13, 4, 4, 3, 1, 2, 4, 14, 4, 12, 23, 3, 16, 5, 9, 3, 9, 4, 4, 2, 34, 7, 15, 9, 3, 4, 4, 4, 4, 4, 10, 4, 14, 4, 5, 24, 17, 43, 7, 38, 14, 4, 9, 1, 4, 4, 10, 4, 28, 4, 14, 4, 14, 4, 4, 10, 4, 10
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Aug 05 2010

Keywords

Comments

Distance between twin semiprime pairs.

Crossrefs

Programs

  • Maple
    A175648 := proc(n) option remember; if n = 1 then 6; else for a from procname(n-1)+1 do if numtheory[bigomega](a) = 2 and numtheory[bigomega](a+4) = 2 then return a; end if; end do: end if; end proc:
    A175668 := proc(n) A175648(n+1)-A175648(n) ; end proc:
    seq(A175668(n),n=1..100) ; # R. J. Mathar, Aug 07 2010

Extensions

Terms from a(33) on corrected by R. J. Mathar, Aug 07 2010

A175683 Numbers n such that 30n-13, 30n-11, 30n-1, 30n+1, 30n+11, 30n+13 are all prime.

Original entry on oeis.org

1, 43, 141, 720, 3038, 3466, 3772, 4068, 7896, 11402, 14070, 17499, 18683, 20887, 25166, 26586, 30311, 33237, 44072, 49791, 56629, 58268, 58764, 71483, 71953, 74284, 79939, 86022, 87199, 88941, 91951, 92273, 100176, 102019, 107505, 109438
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Aug 09 2010

Keywords

Examples

			a(1)=1 because 30*1-13=17=prime, 30*1-11=19=prime, 30*1-1=29=prime, 30*1+1=31=prime, 30*1+11=41=prime, 30*1+13=43=prime.
		

Crossrefs

Cf. A053319.

Extensions

Corrected (3472 replaced by 3772, 49776 replaced by 49791) and extended by R. J. Mathar, Aug 13 2010

A270541 a(n) = A001359(n) - A001359(n+1) - A001359(n+2) + A001359(n+3).

Original entry on oeis.org

4, 6, 6, 6, 0, 12, -6, 0, 6, 0, 0, -24, 18, 6, 0, 0, 0, 24, 42, -24, -42, 48, 18, -30, -30, -6, 0, 126, -6, -144, 18, 18, 108, -12, -120, 0, 12, 48, 48, -12, -66, -36, 6, 96, 6, -78, -18, 90, 6, -72, 18, -24, 36, 60, -60, -30, 12, -6, 12, 6, -24, -30, 12, -12, 78, 18, -54, 0, 0, 138, 0, -102, -12, -42
Offset: 1

Views

Author

Altug Alkan, Mar 18 2016

Keywords

Comments

6*k appears for the form of a(n) for n > 1.
What is the most repeated value of a(n)?
See A270535 for the position of 0's in this sequence.

Examples

			a(1) = 4 because a(1) = A001359(1) - A001359(2) - A001359(3) + A001359(4) = 3 - 5 - 11 + 17 = 4.
		

Crossrefs

Programs

  • Mathematica
    s = Select[Prime@Range[10^6], PrimeQ[# + 2] &]; Table[s[[n]] - s[[n + 1]] - s[[n + 2]] + s[[n + 3]], {n, 74}] (* Michael De Vlieger, Mar 19 2016, after Robert G. Wilson v at A001359 *)
    #[[1]]-#[[2]]-#[[3]]+#[[4]]&/@Partition[Select[Partition[Prime[Range[400]],2,1],#[[2]]-#[[1]]==2&][[;;,1]],4,1] (* Harvey P. Dale, Jun 14 2025 *)
  • PARI
    t(n, p=3) = { while( p+2 < (p=nextprime( p+1 )) || n-->0, ); p-2}
    a(n) = t(n) + t(n+3) - t(n+1) - t(n+2);
    for(n=1, 200, print1(a(n), ", "));

Formula

a(n) = A053319(n+2) - A053319(n).

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