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