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.

A269424 Record (maximal) gaps between primes of the form 8k + 1.

Original entry on oeis.org

24, 32, 56, 64, 88, 112, 120, 136, 160, 216, 232, 240, 264, 304, 384, 480, 488, 528, 544, 576, 624, 640, 720, 760, 816, 888, 960, 1032, 1064, 1200, 1296, 1320, 1432, 1464, 1520, 1560, 1608, 1832, 1848
Offset: 1

Views

Author

Alexei Kourbatov, Feb 25 2016

Keywords

Comments

Dirichlet's theorem on arithmetic progressions suggests that average gaps between primes of the form 8k + 1 below x are about phi(8)*log(x). This sequence shows that the record gap ending at p grows almost as fast as phi(8)*log^2(p). Here phi(n) is A000010, Euler's totient function; phi(8)=4.
Conjecture: a(n) < phi(8)*log^2(A269426(n)) almost always.
A269425 lists the primes preceding the maximal gaps.
A269426 lists the corresponding primes at the end of the maximal gaps.

Examples

			The first two primes of the form 8k + 1 are 17 and 41, so a(1)=41-17=24. The next prime of this form is 73 and the gap 73-41=32 is a new record, so a(2)=32.
		

Crossrefs

Programs

  • Mathematica
    re = 0; s = 17; Reap[For[p = 41, p < 10^8, p = NextPrime[p], If[Mod[p, 8] == 1, g = p - s; If[g > re, re = g; Print[g]; Sow[g]]; s = p]]][[2, 1]] (* Jean-François Alcover, Oct 17 2016, adapted from PARI *)
  • PARI
    re=0; s=17; forprime(p=41, 1e8, if(p%8!=1, next); g=p-s; if(g>re, re=g; print1(g", ")); s=p)