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

A329158 Let P1>=3, P2, P3 be consecutive primes, with P3-P2=2. a(n)=(P2+P3)/12 when P2-P1 sets a record.

Original entry on oeis.org

1, 2, 5, 25, 87, 192, 500, 1158, 1668, 4217, 4713, 5955, 17127, 28905, 61838, 76967, 96147, 139725, 260342, 1061923, 1205080, 4663498, 8871842, 11732765, 32534740, 42313103, 77638122, 92523718, 282054523, 728833340, 2940948542, 3344803093, 11810906035
Offset: 1

Views

Author

Hugo Pfoertner, Nov 06 2019

Keywords

Comments

6*a(n)-1, 6*a(n)+1 are twin primes such that the prime gap immediately preceding 6*a(n)-1 sets a record. The corresponding gap lengths are provided in A329159.

Crossrefs

Programs

  • PARI
    p1=3;p2=5;r=0;forprime(p3=7,1e9,if(p3-p2==2,d=p2-p1;if(d>r,r=d;print1((p2+p3)/12,", ")));p1=p2;p2=p3)

A329159 2*a(n) are the lengths of record prime gaps immediately preceding twin primes.

Original entry on oeis.org

1, 2, 3, 5, 6, 11, 14, 15, 17, 20, 24, 26, 30, 35, 39, 42, 45, 50, 66, 68, 74, 75, 89, 98, 104, 107, 117, 123, 144, 159, 165, 180, 183, 192, 195
Offset: 1

Views

Author

Hugo Pfoertner, Nov 06 2019

Keywords

Comments

The corresponding locations are provided in A329158. The gap 2 -> 3 before the pair 3, 5 is excluded.

Crossrefs

Programs

  • PARI
    p1=3;p2=5;r=0;forprime(p3=7,1e9,if(p3-p2==2,d=p2-p1;if(d>r,r=d;print1(d/2,", ")));p1=p2;p2=p3)

Extensions

a(31)-a(34) from Jinyuan Wang, Mar 01 2020
a(35) from David Trimas, Jul 26 2023

A329161 2*a(n) are the lengths of record prime gaps immediately following twin primes.

Original entry on oeis.org

2, 3, 5, 6, 9, 12, 14, 15, 17, 21, 26, 27, 29, 30, 35, 41, 45, 50, 59, 60, 63, 71, 74, 75, 84, 92, 96, 98, 104, 110, 125, 129, 144, 155, 156, 165, 180, 201, 204, 207
Offset: 1

Views

Author

Hugo Pfoertner, Nov 08 2019

Keywords

Comments

The corresponding locations are provided in A329160, starting at the initial pair 5, 7.

Examples

			a(1) = 2 because the prime gap after 5, 7 has length 11 - 7 = 2*a(1) = 4,
a(2) = 3 because the prime gap after 29,31 has length 37 - 31 = 2*a(2) = 6, with location given by 6*A329160(2) = 30 +- 1. The gaps before all have length 4 (11,13 -> 17), (17,19 -> 23).
		

Crossrefs

Programs

  • PARI
    p1=5; p2=7; r=0; forprime(p3=11, 1e9, if(p2-p1==2, d=p3-p2; if(d>r, r=d; print1(d/2, ", "))); p1=p2; p2=p3)

Extensions

a(39)-a(40) from Jinyuan Wang, Mar 01 2020

A329164 Let P1, P2, P3, P4 be consecutive primes, with P2-P1=P4-P3=2. a(n)=(P1+P2)/12 when P3-P2 sets a new record.

Original entry on oeis.org

1, 23, 322, 495, 3407, 8113, 28893, 139708, 716182, 2497092, 5130198, 5761777, 7315173, 13194622, 145995245, 201544467, 417649822, 566513637, 833667068, 2266818768, 4710228962, 5186737183, 5192311957, 7454170028, 9853412390, 11817808908
Offset: 1

Views

Author

Hugo Pfoertner, Nov 07 2019

Keywords

Comments

Position of record gaps with no primes bounded by consecutive pairs of twin primes. The length of the corresponding record gaps (P3-P1)/6 is given by A329165.
In the neighborhood of a(15), the growth of this sequence seems to change notably. See the plot2 graph in the links. Does this signify anything important? - Peter Munn, Aug 01 2025

Examples

			Values of P1, P2, P3, P4 corresponding to record gaps:
  P3-P1 P1   P2   P3   P4                   a(n)
   6     5    7   11   13        (5+7)/12 =   1
  12   137  139  149  151    (137+139)/12 =  23
  18  1931 1933 1949 1951  (1931+1933)/12 = 322
  30  2969 2971 2999 3001  (2969+2971)/12 = 495
		

Crossrefs

Programs

  • PARI
    p1=3;p2=5;p3=7;r=0;forprime(p4=11,1e9,if(p2-p1==2&&p4-p3==2,d=p3-p2;if(d>r,r=d;print1((p1+p2)/12,", ")));p1=p2;p2=p3;p3=p4)

A329165 Let P1, P2, P3, P4 be consecutive primes with P2-P1=P4-P3=2. a(n)=(P3-P1)/6 when the length of the gap with no primes between the two pairs of twin primes sets a record.

Original entry on oeis.org

1, 2, 3, 5, 6, 9, 12, 17, 18, 21, 22, 23, 25, 31, 33, 35, 40, 41, 42, 47, 48, 49, 51, 52, 53, 57, 58, 62, 63, 66, 71, 75, 77, 78, 81, 83, 85, 90, 91, 93, 98, 100, 105, 108, 111, 115, 119, 123, 125, 135, 138, 148, 150, 152, 165, 170, 173, 180
Offset: 1

Views

Author

Hugo Pfoertner, Nov 07 2019

Keywords

Comments

The position of the occurrence of the n-th record is given by A329164(n)=(P1+P2)/12.

Examples

			See A329164.
		

Crossrefs

Programs

  • Mathematica
    With[{s = Partition[Prime@ Range[10^5], 4, 1]}, Union@ FoldList[Max, Map[(#3 - #1)/6 & @@ # &, Select[s, #2 - #1 == #4 - #3 == 2 & @@ # &]]]] (* Michael De Vlieger, May 26 2020 *)
  • PARI
    p1=3;p2=5;p3=7;r=0;forprime(p4=11,1e9,if(p2-p1==2&&p4-p3==2,d=p3-p1;if(d>r,r=d;print1(d/6,", ")));p1=p2;p2=p3;p3=p4)

Extensions

a(27)-a(28) from Jinyuan Wang, Mar 01 2020
a(29)-a(58) found by Tomáš Brada, Natalia Makarova, May 12 2020

A084105 Middle q of three consecutive primes p,q,r, such that one adjacent prime is near, the other is far and the ratio of the differences (whichever of (r-q)/(q-p) or (q-p)/(r-q) is greater than 1) sets a record.

Original entry on oeis.org

3, 29, 113, 139, 199, 523, 1151, 1669, 2971, 6947, 10007, 16141, 25471, 40639, 79699, 102761, 173359, 265621, 404851, 838249, 1349533, 1562051, 6371537, 7230479, 27980987, 42082303, 53231051, 70396589, 192983851, 253878617, 390932389, 465828731, 516540163, 1692327137
Offset: 1

Views

Author

Hugo Pfoertner, May 29 2003

Keywords

Comments

Are there entries other than a(3) for which the smaller difference exceeds 2?

Examples

			a(3) = 113 because the ratio (113-109)/(127-113) = 2/7 = 0.28571.. is smaller than the previous minimum produced by (31-29)/(29-23) = 1/3 = 0.33333...
		

Crossrefs

Programs

  • PARI
    a084105(limit)={my(p1=2,p2=3,r=0);forprime(p3=5,limit,my(q=max((p2-p1)/(p3-p2),(p3-p2)/(p2-p1)));if(q>r,r=q;print1(p2,", "));p1=p2;p2=p3)};
    a084105(600000000) \\ Hugo Pfoertner, Sep 04 2020

Extensions

More terms from Don Reble, May 29 2003
a(32)-a(34) from Hugo Pfoertner, Nov 06 2019

A329252 Let P1 >= 5, P2, P3 be consecutive primes, with P2 - P1 = 2. a(n) = (P1 + P2)/12 for the first occurrence of (P3 - P2)/2 = n.

Original entry on oeis.org

1, 5, 0, 23, 33, 0, 322, 87, 0, 325, 278, 0, 495, 1293, 0, 2027, 4725, 0, 3468, 2690, 0, 27177, 14438, 0, 4245, 6773, 0, 13283, 24938, 0, 104283, 92067, 0, 28893, 60015, 0, 119362, 46905, 0, 44270, 106323, 0, 90713, 67475, 0, 266618, 207107, 0
Offset: 2

Views

Author

Hugo Pfoertner, Nov 10 2019

Keywords

Comments

Position of first occurrence of a gap of length P3 - P2 = 2*n containing no primes, immediately following the twin primes (P1,P2). To indicate impossible gaps of lengths 8, 14, 20, ..., a(3k+1) is set to 0 for all k >= 1.

Examples

			a(5) = 23 because the prime gap following P1 = 6*23 - 1 = 137, P2 = 6*23 + 1 = 139 is the first such gap with length 2*n = 10. P3 - P2 = 149 - 139 = 10.
		

Crossrefs

Programs

  • PARI
    my(v=vector(60), p1=5, p2=7, d); forprime(p3=11, 5e6, if(p2-p1==2, d=(p3-p2)/2; if(v[d]==0, v[d]=(p1+p2)/12)); p1=p2; p2=p3); v[2..49]

A337436 6*a(n) + 1 is the least upper prime p of a pair of twin primes p - 2, p, for which the prime gap immediately following p achieves the size 2*A007494(n).

Original entry on oeis.org

1, 5, 23, 33, 322, 87, 325, 278, 495, 1293, 2027, 4725, 3468, 2690, 27177, 14438, 4245, 6773, 13283, 24938, 104283, 92067, 28893, 60015, 119362, 46905, 44270, 106323, 90713, 67475, 266618, 207107, 139708, 1496910, 716182, 598867, 439633, 688518, 224922, 315893
Offset: 1

Views

Author

Hugo Pfoertner, Sep 02 2020

Keywords

Comments

Apart from the atypical case [3, 5, 7], prime gaps nextprime(p+1)-p following a pair of twin primes p-2, p can only have the sizes 4, 6, 10, 12, 16, 18, ..., i.e., numbers k of the form 2*(k == 0 or 2 mod 3) = 2*A007494(n).

Examples

			a(1) = 1: The first occurrence of 3 consecutive primes [p-2, p, p+4] is at p = 6*a(1) + 1 = 7 -> [5, 7, 11],
a(2) = 5: consecutive primes [p-2, p, p+6] first occur at p = 6*a(2) * 1 = 31 -> [29, 31, 37],
a(3) = 23: consecutive primes [p-2, p, p+10] first occur at p = 6*a(3) + 1 = 139 -> [137, 139, 149].
		

Crossrefs

Showing 1-8 of 8 results.