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.

A268925 Record (maximal) gaps between primes of the form 6k + 1.

This page as a plain text file.
%I A268925 #42 Dec 19 2021 18:27:44
%S A268925 6,12,18,30,54,60,78,84,90,96,114,162,174,192,204,252,270,282,312,330,
%T A268925 336,378,462,486,522,528,534,600,606,612,642,666,780,810,894,1002
%N A268925 Record (maximal) gaps between primes of the form 6k + 1.
%C A268925 Dirichlet's theorem on arithmetic progressions and the GRH suggest that average gaps between primes of the form 6k + 1 below x are about phi(6)*log(x). This sequence shows that the record gap ending at p grows almost as fast as phi(6)*log^2(p). Here phi(n) is A000010, Euler's totient function; phi(6)=2.
%C A268925 Conjecture: a(n) < phi(6)*log^2(A268927(n)) almost always.
%C A268925 Conjecture: phi(6)*n^2/6 < a(n) < phi(6)*n^2 almost always. - _Alexei Kourbatov_, Nov 27 2019
%H A268925 Alexei Kourbatov, <a href="http://arxiv.org/abs/1610.03340">On the distribution of maximal gaps between primes in residue classes</a>, arXiv:1610.03340 [math.NT], 2016.
%H A268925 Alexei Kourbatov, <a href="https://arxiv.org/abs/1709.05508">On the nth record gap between primes in an arithmetic progression</a>, arXiv:1709.05508 [math.NT], 2017; <a href="https://doi.org/10.12988/imf.2018.712103">Int. Math. Forum, 13 (2018), 65-78</a>.
%H A268925 Alexei Kourbatov and Marek Wolf, <a href="http://arxiv.org/abs/1901.03785">Predicting maximal gaps in sets of primes</a>, arXiv preprint arXiv:1901.03785 [math.NT], 2019.
%F A268925 a(n) = A268927(n) - A268926(n). - _Alexei Kourbatov_, Jun 21 2020
%e A268925 The first two primes of the form 6k+1 are 7 and 13, so a(1)=13-7=6. The next prime of this form is 19; the gap 19-13 is not a record so nothing is added to the sequence. The next prime of this form is 31; the gap 31-19=12 is a new record, so a(2)=12.
%t A268925 re = 0; s = 7; Reap[For[p = 13, p < 10^8, p = NextPrime[p], If[Mod[p, 6] != 1, Continue[]]; g = p - s; If[g > re, re = g; Print[g]; Sow[g]]; s = p]][[2, 1]] (* _Jean-François Alcover_, Dec 12 2018, from PARI *)
%t A268925 records[n_]:=Module[{ri=n,m=0,rcs={},len},len=Length[ri];While[len>0,If[ First[ri]>m,m=First[ri];AppendTo[rcs,m]];ri=Rest[ri];len--]; rcs]; records[ Differences[Select[6*Range[0,3*10^6]+1,PrimeQ]]] (* the program generates the first 30 terms of the sequence. *) (* _Harvey P. Dale_, Dec 19 2021 *)
%o A268925 (PARI) re=0; s=7; forprime(p=13, 1e8, if(p%6!=1, next); g=p-s; if(g>re, re=g; print1(g", ")); s=p)
%Y A268925 Cf. A002476, A268926 (primes preceding the maximal gaps), A268927 (primes at the end of maximal gaps), A330853, A330854.
%K A268925 nonn,more
%O A268925 1,1
%A A268925 _Alexei Kourbatov_, Feb 15 2016