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.

This page as a plain text file.
%I A329165 #23 May 27 2020 10:25:05
%S A329165 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,
%T A329165 57,58,62,63,66,71,75,77,78,81,83,85,90,91,93,98,100,105,108,111,115,
%U A329165 119,123,125,135,138,148,150,152,165,170,173,180
%N 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.
%C A329165 The position of the occurrence of the n-th record is given by A329164(n)=(P1+P2)/12.
%e A329165 See A329164.
%t A329165 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 *)
%o A329165 (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)
%Y A329165 Cf. A053778, A329158, A329159, A329160, A329161, A329164.
%K A329165 nonn,more
%O A329165 1,2
%A A329165 _Hugo Pfoertner_, Nov 07 2019
%E A329165 a(27)-a(28) from _Jinyuan Wang_, Mar 01 2020
%E A329165 a(29)-a(58) found by _Tomáš Brada_, _Natalia Makarova_, May 12 2020