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.

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