A084162 a(n) is the length of the gap in sequence A084161.
3, 8, 12, 16, 24, 32, 48, 56, 60, 68, 72, 88, 108, 128, 148, 152, 200, 224, 240, 248, 252, 260, 272, 280, 324, 360, 420, 444, 460, 516, 520, 540, 628, 684, 696, 716, 720, 744, 800, 884, 960, 1044, 1084
Offset: 0
Keywords
Examples
a(3) = 16: There are no primes p = 1 mod 4 between 73 and 89, this gap is the largest up to 89, the gap size is 16.
Links
- Alexei Kourbatov, On the distribution of maximal gaps between primes in residue classes, arXiv:1610.03340 [math.NT], 2016.
- Alexei Kourbatov, On the nth record gap between primes in an arithmetic progression, arXiv:1709.05508 [math.NT], 2017; Int. Math. Forum, 13 (2018), 65-78.
- Alexei Kourbatov, Marek Wolf, Predicting maximal gaps in sets of primes, arXiv:1901.03785 [math.NT], 2019.
Crossrefs
Programs
-
Mathematica
Reap[Print[3]; Sow[3]; r = 0; p = 5; For[q = 7, q < 10^7, q = NextPrime[q], If[Mod[q, 4] == 3, Continue[]]; g = q - p; If[g > r, r = g; Print[g] Sow[g]]; p = q]][[2, 1]] (* Jean-François Alcover, Feb 20 2019, from PARI *)
-
PARI
print1(3); r=0; p=5; forprime(q=7, 1e7, if(q%4==3, next); g=q-p; if(g>r, r=g; print1(", "g)); p=q)
Comments