This site is supported by donations to The OEIS Foundation. Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A274123 Let F(g,p) be the frequency of g up to the prime nextprime(p+1). F(g,p_i) is a record for some prime p_i and F(g, p_(i+1)) is a new record for the next larger prime after p_i. The sequence lists the primes p_(i+1), except a(1) = 2. 4
 2, 127, 149, 383, 431, 443, 487, 557 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 COMMENTS Up to large values of n, 6 is conjectured to be the most occurring gap. See link "Polignac's conjecture". If this conjecture is true the sequence is finite. For primes up to 10^8, there are no more terms. Up to 10^6, the prime gap 2 occurs 8169 times, the gap 4 occurs 8143 times and the gap 6 occurs 13549 times. LINKS Wikipedia, Polignac's conjecture. EXAMPLE Before counting gaps, all gaps are zero, so the first pass happens after the first prime, 2. Up to and including 113, a gap of 2 occurs at least as often as any other gap. At prime 113, the gaps 2 and 4 are the most frequent (both occur 10 times). After 127, the next prime after 113, there is a gap of 4. So at the prime 127, the gap 4 has occurs the most of all gaps. This was not the case at the prime previous to 127 (the prime 113). Therefore, 127 is in the sequence. PROG (PARI) /* See link by name "PARI program" for an extended version with comments. */ upto(n) = {my(gapcount=List(), passes=List(), gmax = 0, imax = 0); n=max(n, 3); forprime(i=3, n, g = nextprime(i+1) - i; for(i = #gapcount+1, g\2, listput(gapcount, 0)); gapcount[g\2]++; if(gapcount[g\2] > gmax, gmax = gapcount[g\2]; if(imax!=g\2, listput(passes, i); imax=g\2))); passes=2; passes} \\ David A. Corneth, Jun 28 2016 CROSSREFS Cf. A274121, A274122. Sequence in context: A139904 A167414 A065381 * A141928 A062588 A125634 Adjacent sequences:  A274120 A274121 A274122 * A274124 A274125 A274126 KEYWORD nonn,more AUTHOR David A. Corneth, Jun 10 2016 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified May 24 06:53 EDT 2019. Contains 323529 sequences. (Running on oeis4.)