mersenneforum.org (https://www.mersenneforum.org/index.php)
-   Prime Gap Searches (https://www.mersenneforum.org/forumdisplay.php?f=131)
-   -   Gaps between non-consecutive primes (https://www.mersenneforum.org/showthread.php?t=27301)

 mart_r 2021-11-04 21:55

Gaps between non-consecutive primes

In the last few days I dug my fangs into gaps between primes p[SUB]n[/SUB] and p[SUB]n+k[/SUB] (with k=1 these are the usual well-known prime gaps, for k=2 see A[OEIS]144103[/OEIS], for k=3 see A[OEIS]339943[/OEIS], for k=4 see A[OEIS]339944[/OEIS]).

This can be seen as part of the effort to further improve the amount of empirical data related to prime gaps.
Recently I found the paper [URL]https://arxiv.org/abs/2011.14210[/URL] (Abhimanyu Kumar, Anuraag Saxena: Insulated primes), which makes some predictions regarding k=2, but is based on quite limited empirical study.

Here's a tidbit of data of especially large gaps for k=1..19 and p<6*10[SUP]12[/SUP]:

[CODE] k CSG_max * p_n p_n+k
1 0.7975364 2614941710599 2614941711251
2 0.8304000 5061226833427 5061226834187
3 0.8585345 5396566668539 5396566669381
4 0.8729716 4974522893 4974523453 (largest CSG_max thus far)
5 0.8486459 137753857961 137753858707
6 0.8358987 5550170010173 5550170011159
7 0.8396098 3766107590057 3766107591083
8 0.8663070 11878096933 11878097723
9 0.8521843 1745499026867 1745499027983
10 0.8589305 5995661470529 5995661471797
11 0.8467931 5995661470481 5995661471797
12 0.8347906 5995661470529 5995661471893
13 0.8439277 5995661470529 5995661471977
14 0.8312816 5995661470481 5995661471977
15 0.7987377 5995661470471 5995661471977
16 0.7901341 5568288566663 5568288568217
17 0.7632862 396016668869 396016670261
18 0.7476038 396016668833 396016670261
19 0.7560424 968269822189 968269823761[/CODE]* A version of the Cramér-Shanks-Granville ratio. Only a quick spreadsheet formula, this could probably use some fine tuning[SUP]1)[/SUP], but for the time being, in this table
[$]CSG = \Large \frac{gap}{(\log \frac{p_n+p_{n+k}}{2} +k-1)^2}[/$]

[SUP]1)[/SUP] I'd prefer something like M (the "merit") = Gram(p[SUB]n+k[/SUB])-Gram(p[SUB]n[/SUB])-k+1 where Gram(x) is Gram's version of Riemann's pi(x) approximation, and CSG = M[SUP]2[/SUP]/gap - pending negotiations...

Calculations will have reached p ~ 7*10[SUP]12[/SUP] by tomorrow, and additionally for k=2 with p ~ 16*10[SUP]12[/SUP]. Not terribly fast, I admit.

Does anybody know of any further work on this topic?

 Bobby Jacobs 2021-11-07 13:34

For each k, what are the first few gaps with record CSG ratio? This is very interesting.

 mart_r 2021-11-09 18:10

Greetings Bobby,

I'd like to run these numbers through Pari again before posting more inconsistent/approximate numbers. The formula with the term "-k+1" (see [SUP]1)[/SUP] from previous post) is only working properly when CSG = max(0,M)[SUP]2[/SUP]/gap since M can be negative (because of the aforementioned term). Working out details like these takes me inordinately long...

Good news is, for p = 8,281,634,108,677 and k = 19, I get a CSG > 1 with the rough-and-ready version of the fine-tuned formula: gap = 1812, M = gap/log(p+gap/2)-18 ~ 42.918 (there are 60.918 primes on average in a range of 1812 integers, i.e. 42.918 more than the 18 that are actually between the bounding primes), and CSG = M[SUP]2[/SUP]/gap ~ 1.0165. With p that large, there won't be much of a difference anymore when using Gram(x) in the calculation of CSG.

 Bobby Jacobs 2021-11-14 17:20

When n=3, a big gap seems like 35617, 35671, 35677, 35729. There is a gap of 54 between 35617 and 35671, which is big for numbers of that size. After the gap of 6 between 35671 and 35677, there is another big gap of 52 between 35677 and 35729. Therefore, the 3-gap between 35617 and 35729 is a surprisingly large prime gap.

 mart_r 2021-11-17 13:51

[QUOTE=Bobby Jacobs;593106]When n=3, a big gap seems like 35617, 35671, 35677, 35729.[/QUOTE]

It doesn't only seem like a big gap, it's listed in A339943 as a(56), since 56=(35729-35617)/2.
I have a lot of data ready for submission, it just takes me longer to actually submit it, my schedule is pretty clogged at the moment...

 Bobby Jacobs 2021-11-23 01:33

I looked at A115401, the record gaps between primes 3 apart, and it turns out that the gap of 112 between 35617 and 35729 is very big. The sequence starts out smoothly. After the initial 5, every even number from 8 to 36 is in the sequence. There are not many even numbers missing up to 68. Then, it jumps to 78, 84, and a really big leap to 112. That corresponds to the 35617, 35729 gap. It is an enormous prime gap!

 mart_r 2021-11-29 11:54

I have uploaded some data for posterity, differences d between primes p[SUB]n[/SUB] and p[SUB]n+k[/SUB] for k <= 130 and d <= 740, see 2nd link for A[OEIS]086153[/OEIS].

 mart_r 2021-12-20 21:33

1 Attachment(s)
Some data in the attachment, just to show off.

The interested reader might also like to check, for instance, the differences p(n+42)-p(n) for p in the range [327076775000..327076783000]. Makes for a nice graph.

And this related result, 100 primes in the range p+[1..8349] while there are no primes in q+[1..8349], with q < p, still appears to be unmatched:
[URL]https://www.mersenneforum.org/showpost.php?p=479832&postcount=86[/URL]

Excuse my being a bit cocky today :wink:

 robert44444uk 2021-12-22 09:31

[QUOTE=mart_r;595755]Some data in the attachment, just to show off.

The interested reader might also like to check, for instance, the differences p(n+42)-p(n) for p in the range [327076775000..327076783000]. Makes for a nice graph.

And this related result, 100 primes in the range p+[1..8349] while there are no primes in q+[1..8349], with q < p, still appears to be unmatched:
[URL]https://www.mersenneforum.org/showpost.php?p=479832&postcount=86[/URL]

Excuse my being a bit cocky today :wink:[/QUOTE]

Cocky!

 mart_r 2021-12-22 17:22

1 Attachment(s)
[QUOTE=robert44444uk;595925]Cocky![/QUOTE]

What? What I wrote did look a little conceited to me:smile:

[QUOTE=mart_r;595755]The interested reader might also like to check, for instance, the differences p(n+42)-p(n) for p in the range [327076775000..327076783000]. Makes for a nice graph.
[/QUOTE]

That is, using a certain style of graph and a little imagination
|
|
V

 robert44444uk 2021-12-23 14:40

[QUOTE=mart_r;595952]What? What I wrote did look a little conceited to me:smile:

[/QUOTE]

Nah, not really, Excellent work as always mart_r

 mart_r 2021-12-31 11:18

New Year's Eve consolidation

1 Attachment(s)
Some data for maximal gaps in the file in close proximity. [SIZE=1][COLOR=LemonChiffon]In the next update, I'll include the data for p=2, I promise.[/COLOR][/SIZE]

There are three primes (well, actually, 54 primes:) that await discovery, for
k=16 / d=76
k=17 / d=82
k=18 / d=84
And possibly feasible for J. Wroblewski and R. Chermoni:
k=19 / d=86 and d=88
k=20 / d=90 and d=92

As a by-product, a puzzle:
Given x, find the next three consecutive primes >= x. Denote the two gaps between them g[SUB]1[/SUB] and g[SUB]2[/SUB], and let g[SUB]1[/SUB] >= g[SUB]2[/SUB]. Let r = g[SUB]1[/SUB]/g[SUB]2[/SUB].
As x becomes larger, the geometric mean r[SUB]gm[/SUB] of values of r also become larger. Find an asymptotic function f(x) ~ r[SUB]gm[/SUB].

 mart_r 2022-01-03 20:42

Staking claims

A measurably unusual scarcity of primes appears between 6,215,409,275,042 and 6,215,409,279,556 - there are only 83 primes in-between, just a little over half as many as expected on average, and the associate CSG value is 1.0944363.
The year starts off pretty well.

 Bobby Jacobs 2022-01-09 14:14

[QUOTE=mart_r;595952]
[QUOTE=robert44444uk;595925]Cocky![/QUOTE]
What? What I wrote did look a little conceited to me:smile:
[/QUOTE]

This conversation does not make sense to me. It first seems like Robert is agreeing with you that you are being cocky. However, your response acts like he is not agreeing. Then, in the next post, he says that you are not cocky. What is going on?

 mart_r 2022-01-09 20:37

[QUOTE=Bobby Jacobs;597473]What is going on?[/QUOTE]
Building mountains out of molehills, I guess :smile:
I thought Robert was making fun of me ... one word responses can be confusing, maybe it was a misunderstanding on my part. Those language barriers...

Any suggestions on whether I should rather continue to search larger primes for k<=109, or to look at larger values of k?

 robert44444uk 2022-01-10 10:05

Hi all

I did a bit of searching around the average merit of 100 gaps in the range of 101 primes, and my best performance is (I've checked up to 9.675e11):

Gap=4354 Average merit=1.622541804, from prime 450867605017 to 450867609371

My method takes the average gap to be [g/ln(p1)+g/ln(p101)]/(2*100) where g is, in this case 4354

At the other end of the spectrum, the following range:

Gap=1554 Average Merit=0.584366417 from prime 354120798439 to 354120799993

 robert44444uk 2022-01-10 10:22

[QUOTE=mart_r;592465]

Here's a tidbit of data of especially large gaps for k=1..19 and p<6*10[SUP]12[/SUP]:

[CODE] k CSG_max * p_n p_n+k
1 0.7975364 2614941710599 2614941711251
2 0.8304000 5061226833427 5061226834187
3 0.8585345 5396566668539 5396566669381
4 0.8729716 4974522893 4974523453 (largest CSG_max thus far)
5 0.8486459 137753857961 137753858707
6 0.8358987 5550170010173 5550170011159
7 0.8396098 3766107590057 3766107591083
8 0.8663070 11878096933 11878097723
9 0.8521843 1745499026867 1745499027983
10 0.8589305 5995661470529 5995661471797
11 0.8467931 5995661470481 5995661471797
12 0.8347906 5995661470529 5995661471893
13 0.8439277 5995661470529 5995661471977
14 0.8312816 5995661470481 5995661471977
15 0.7987377 5995661470471 5995661471977
16 0.7901341 5568288566663 5568288568217
17 0.7632862 396016668869 396016670261
18 0.7476038 396016668833 396016670261
19 0.7560424 968269822189 968269823761[/CODE].....

Does anybody know of any further work on this topic?[/QUOTE]

I confirm Marts values for 17,18,19 as the largest average merits between 18,19 and 20 primes respectively,

It is worth looking at the minimum value found to date for these, as no-one has found the relevant all prime k-tuple at these sizes. Where 2 are listed, it shows the smallest gap and the smallest average merit in the gap.

[CODE]
n gap p(n) p(n+k) ave merit
17 98 341078531681 341078531779 0.21708
18 114 1054694671669 1054694671669 0.22877
18 110 43440699011 43440699121 0.24948
19 126 1085806111031 1085806111157 0.23929
19 120 31311431897 31311432017 0.26134

[/CODE]

 robert44444uk 2022-01-10 10:45

Here are some results for 20..25

Small average merits and gaps:

[CODE]
n gap p(n) p(n+k) ave merit checked to

20 138 2037404713403 2037404713541 0.243448948 2.80E+12
20 136 1085806111021 1085806111157 0.245369164
21 144 2037404713397 2037404713541 0.241936843 2.81E+12
22 160 2037404713381 2037404713541 0.256599682 2.81E+12
22 156 325117822691 325117822847 0.267506235
23 174 2766595321597 2766595321771 0.264069002 2.81E+12
24 180 220654442209 220654442389 0.287137792 1.24E+12
25 190 220654442209 220654442399 0.290966296 8.22E+11
[/CODE]

And large, tested up to the same values, so it looks like the 24 and 25 records may go - no doubt somewhere in mart_r's file:

[CODE]
n gap p(n) p(n+k) ave merit
20 1582 968269822189 968269823771 2.866069068
21 1630 968269822189 968269823819 2.812408994
22 1680 968269822189 968269823869 2.766921063
23 1756 2137515911737 2137515913493 2.689187618
24 1740 752315299717 752315301457 2.651169565
25 1780 628177622389 628177624169 2.62091465

[/CODE]

 robert44444uk 2022-01-10 10:53

[QUOTE=mart_r;597502]Building mountains out of molehills, I guess :smile:
I thought Robert was making fun of me ... one word responses can be confusing, maybe it was a misunderstanding on my part. Those language barriers...

Any suggestions on whether I should rather continue to search larger primes for k<=109, or to look at larger values of k?[/QUOTE]

I already did a bit of work at k=1000 but I might concentrate at k=200 and 500 and see where that goes

 robert44444uk 2022-01-10 17:43

[QUOTE=mart_r;595755]

And this related result, 100 primes in the range p+[1..8349] while there are no primes in q+[1..8349], with q < p, still appears to be unmatched:
[URL]https://www.mersenneforum.org/showpost.php?p=479832&postcount=86[/URL]

[/QUOTE]

This is much harder than I anticipated - it really is an outstanding result. I have started to look at the next obvious candidate starting from 3483347771*409#/30 - 7016 (merit >39). I have only achieved 67 primes so far (after about 30 minutes of checking), so I am wondering if this can ever get to 100 primes

 mart_r 2022-01-10 21:40

Your results for maximum average merits are in accordance with my results in post # 12.

I didn't look for minimum average merits as they are theoretically covered by the minimum widths of k-tuplets. But some clusters are missing, see also post # 12. However, more data is always welcome!

[QUOTE=robert44444uk;597586]This is much harder than I anticipated - it really is an outstanding result. I have started to look at the next obvious candidate starting from 3483347771*409#/30 - 7016 (merit >39). I have only achieved 67 primes so far (after about 30 minutes of checking), so I am wondering if this can ever get to 100 primes[/QUOTE]

Though the difference seems little (merit 39.62 vs. 41.94), it's several times as hard to fill the gap with 100 primes larger than those surrounding the gap. I'd have to check the stats, but an admissible 1886-tuplet pattern (minimum width 15899) with no factors < 400-ish would be a good start for the search.

 robert44444uk 2022-01-11 10:04

[QUOTE=mart_r;597600]

Though the difference seems little (merit 39.62 vs. 41.94), it's several times as hard to fill the gap with 100 primes larger than those surrounding the gap. I'd have to check the stats, but an admissible 1886-tuplet pattern (minimum width 15899) with no factors < 400-ish would be a good start for the search.[/QUOTE]

I'm trying to understand the approach.

I've found a 1886-tuplet pattern width 15898 from the internet,[URL="https://math.mit.edu/~primegaps/tuples/admissible_1886_15898.txt"]https://math.mit.edu/~primegaps/tuples/admissible_1886_15898.txt[/URL] so is the idea to get a Chinese Remainder (C) based on mods of primes <400, referenced the start prime of the large gap (P), and then to prp from P+n*C to P+n*C+15900, n integer? Or is there further sieving to do? Are the Chinese mods gotten by a greedy algorithm?

Is such a large Chinese potentially inferior to a much smaller Chinese (c) based around say 1000-tuplet where, if the prime count was high after testing, then it could be tested over the whole range. I'm thinking this trades off the greater chance of primes with ranges close to P, i.e. at P+c*n against the low chance at P+C*n

 robert44444uk 2022-01-11 16:38

[QUOTE=robert44444uk;597644]I'm trying to understand the approach.

I've found a 1886-tuplet pattern width 15898 from the internet,[URL="https://math.mit.edu/~primegaps/tuples/admissible_1886_15898.txt"]https://math.mit.edu/~primegaps/tuples/admissible_1886_15898.txt[/URL] so is the idea to get a Chinese Remainder (C) based on mods of primes <400, referenced the start prime of the large gap (P), and then to prp from P+n*C to P+n*C+15900, n integer? Or is there further sieving to do? Are the Chinese mods gotten by a greedy algorithm?

Is such a large Chinese potentially inferior to a much smaller Chinese (c) based around say 1000-tuplet where, if the prime count was high after testing, then it could be tested over the whole range. I'm thinking this trades off the greater chance of primes with ranges close to P, i.e. at P+c*n against the low chance at P+C*n[/QUOTE]

so if I have done this right, the CRT offset is 49268213492433141497814341275312197605721177068674522156228345708919204704299688530737031645921153516711274856551464412837807539813310218115111791871010488468153

This is based on the mods of primes to 400 that never produce 0mod(the prime) for all values in the admissible sets. So 1mod2, 1mod3, 3mod5, 4mod7...

this is approx. 5e160, compared to the prime at the start of the gap of 15900, which is 2e174, so it looks fine to play around with.

 mart_r 2022-01-11 22:52

I get the same CRT offset with the pattern you linked to, so that's correct.
For my result, I didn't bother too much about sieving and just tested n*p#+c+x for primes, incrementing n when not enough primes were found above a customized threshold for x; something should be gained by applying an appropriate sieving technique. Up to 479#, there's only one open residue class for each prime, so it should merely be checked that not too many potential coprimes are cancelled out by the sieve.

Just for fun, here are offsets for some larger p#:
[CODE]n*401#+
39513451711353368972101707142676951932015103896038867201264946985487496815918734804213619530781605639321227211666671723990836697616026451458080515468952387537444673

n*409#+
5300963833569209940057949054368721853533208296343484993741509551411018530966721606193800807153951251943913507869529328702625642328421257335999756718592000205492358083

n*419#+
906110212932116653575732557665488316402090982314903912519073620662591471401157669028755216511381275347162712814920340507230752131956051717149856040611426373130703347023
[/CODE]

 robert44444uk 2022-01-12 09:04

I'm doing something wrong I think, although I am not sure (maybe mart_r could check)

Average number of primes in a range of x=15900 integers from a = 3483347771*409#/30 is = 15900/ln(a) or approx 39.65, given an average gap of 401.

Average found number primes for n from 0 to 100 in n*p#+c+x, is 40.01 with a max prime count of 54 at n=93. c offset: 49268....

I am surprised to see such a small average pickup it is well within the bounds of statistics to be zero effect.

if I am doing this right I am not sure the method pays off.

 robert44444uk 2022-01-12 12:27

[QUOTE=robert44444uk;597739]I'm doing something wrong I think, although I am not sure (maybe mart_r could check)

Average number of primes in a range of x=15900 integers from a = 3483347771*409#/30 is = 15900/ln(a) or approx 39.65, given an average gap of 401.

Average found number primes for n from 0 to 100 in n*p#+c+x, is 40.01 with a max prime count of 54 at n=93. c offset: 49268....

I am surprised to see such a small average pickup it is well within the bounds of statistics to be zero effect.

if I am doing this right I am not sure the method pays off.[/QUOTE]

I was doing this very wrong, silly me.

I think I was wrong to start at the deficient primorial 409#/30, I should have started with the primorial 409#, with a lower multiplier, in this case 3483347771/30 = 116111593 rounded up. The I don't multiply the offset c, I add one each time to n. My results for the first 100 n above 116111593 shows an average of 48.62 with a maximum of 63. That's more like it!

 robert44444uk 2022-01-12 16:41

[QUOTE=robert44444uk;597555]I already did a bit of work at k=1000 but I might concentrate at k=200 and 500 and see where that goes[/QUOTE]

500 results - tested to approx. 1.1e12:

Largest gap: 16690 Average merit: 1.229114171 First prime: 622973626447
Smallest gap: 10306 Average merit: 0.795722241 First prime: 177726413581

200 results: tested to approx. 1.39e12

Largest: 7338 Average merit: 1.414200628 First prime:185067242119
Smallest: 3646 Average merit: 0.694714106 First prime: 249072607711

100 results: tested to approx. 2.4e12

Largest: 4540 Average merit: 1.642701445 First prime: 1006401165853
Smallest: 1640 Average merit: 0.580014238 First prime: 1904361666929

 robert44444uk 2022-01-14 09:44

[QUOTE=robert44444uk;597747]I was doing this very wrong, silly me.

I think I was wrong to start at the deficient primorial 409#/30, I should have started with the primorial 409#, with a lower multiplier, in this case 3483347771/30 = 116111593 rounded up. The I don't multiply the offset c, I add one each time to n. My results for the first 100 n above 116111593 shows an average of 48.62 with a maximum of 63. That's more like it![/QUOTE]

After 20 hours of processing I'm afraid that I can beat 87 primes in a range of 15900 - I'll continue the search though
In n*p#+c+x, where p = 409, c = 492682..., x from 0 to 15900, then 87 primes are at n =
117575956
118482688

 robert44444uk 2022-01-14 10:22

[QUOTE=robert44444uk;597768]

100 results: tested to approx. 2.4e12

Largest: 4540 Average merit: 1.642701445 First prime: 1006401165853
Smallest: 1640 Average merit: 0.580014238 First prime: 1904361666929[/QUOTE]

As an aid to the factorials and offsets approach, it is relatively simple to show that there is no range of 100 primes p1..p100 at relatively small p1 where p1 is larger than any gap smaller than p1.

In the exhaustive check of gaps between 101 primes ( a proxy for 100) highlighted with p1 <2.4e12, no range has an average merit of < 0.58, which equates to requiring a gap, where p1 is less than 2.4e12 whose merit is > 58. As the largest merit ever found is not even 42, there is the basis for the proof.

 mart_r 2022-01-14 21:25

[QUOTE=robert44444uk;597925]After 20 hours of processing I'm afraid that I can beat 87 primes in a range of 15900 - I'll continue the search though
In n*p#+c+x, where p = 409, c = 492682..., x from 0 to 15900, then 87 primes are at n =
117575956
118482688[/QUOTE]

It took me a couple of days, so I do think you have a chance to beat me at my own game :smile:
I was also trying to squeeze even more primes into an interval of 8348, about two years ago, but a couple more days of searching and I didn't get past about 94 or 95 primes.

 robert44444uk 2022-01-15 11:35

A slight improvement in the prime count for n in n*p#+c+x, where p = 409, c = 492682..., x from 0 to 15900

123733011 91
120673847 88
121848887 88

In terms of sieves, I found it was useful to break down the range x into four even parts and set cumulative targets for each range. I found at least 8 values at 50 or more primes at half way with a top value of 53.

I do feel that it would be better to concentrate more on the 41 merit gap, maybe using a few new tweaks to get to the 101 level. Almost 42 merit is totally different to 39 in terms of space.

 robert44444uk 2022-01-17 08:56

A couple more, getting closer, but not that close

124977806 92
125316443 90

 mart_r 2022-01-17 21:19

[QUOTE=robert44444uk;598157]A couple more, getting closer, but not that close

124977806 92
125316443 90[/QUOTE]
Any chance you can still tweak the algorithm a bit in your favor?

Some possibly useful ideas, theory-wise:

Let [$]p_n[/$] be large (well, say, > 10[SUP]6[/SUP]), let [$]p_{n+k}[/$] be the k-th prime after [$]p_n[/$] (k < [$]\sqrt{p_n}[/$], just to be safe).

[$]g = p_{n+k} - p_n[/$]

[$]m = G(p_{n+k})-G(p_n)-k+1[/$], G(x) being the formula for the blue line in the graph in [URL]http://www.primefan.ru/stuff/primes/table.html#theory[/URL]

[$]CSG^* = \frac{m \cdot |m|}{g}[/$]

[$]m^* = CSG^* \cdot \log p_{n+k}[/$]

One may be inclined to expect the distribution of [$]m^*[/$] as behaving like the ones for the merits of usual prime gaps. This may even be half-way right, as experimental data suggests, for example these 1,751,000 samples of intervals of length 10[SUP]5[/SUP] with p in the vicinity of 34*10[SUP]12[/SUP] can be turned into this (similar results for other parameters):

[CODE]m*< #times r (#/total) log(1-r)
1 1581721 0.903324386 -2.336394091 1)
2 1695327 0.968205026 -3.448447043
3 1731016 0.988587093 -4.473010379
4 1743358 0.995635637 -5.434282983
5 1747999 0.998286122 -6.368996766
6 1749835 0.999334666 -7.315221245
7 1750528 0.999730440 -8.218718626
8 1750830 0.999902913 -9.239899174
9 1750932 0.999961165 -10.15618991
10 1750978 0.999987436 -11.28465516
11 1750990 0.999994289 -12.07311252
12 1750995 0.999997144 -12.76625970
13 1750997 0.999998287 -13.27708532
14 1750998 0.999998858 -13.68255043
15 1750999 0.999999429 -14.37569761
16 1751000 1 [/CODE]1) Note: for usual gaps and merit < 1, log(1-r) would statistically be around -1, but [$]m^*[/$] is < 0 around half of the time, and due to the special treatment the distribution in the low range of [$]m^*[/$] is somewhat... different. Darn, I need to find the time to catch up on Gaussian/Poisson/... distribution measures.

Would that lead to a way to conjecture that the gaps between non-consecutive primes are bounded by a constant times [$](\log(p)+k) \cdot \log(p)[/$] ? Or am I thinking way too complicated?

 robert44444uk 2022-01-24 09:11

The closest I have gotten to 100 primes following 1571162669*193#+129568114146274965711541776666046371290799466131684641935400586161726498035577 is 95 primes, within a period of 8346 compared to the well-known gap of 8350 following 29370323406802259015...95728858676728143227

sa I have devoted far too many resources to this, I will rest.

I also look briefly at the gap following 266190823030249*1129#/210-22844, but the length of time taken to check each possible range of 43k+ is too long. The best I achieved to date is 84 primes following [code]1101306855*1151#+67995358713657430359048762006542336703972224978670437437482633858004501532345946577534465437727848195399060224576423535081766982746433158823827486255141146637104093921266819644253660410020299599441986875748296750154110874438401578094603567430369998521465621565610168020569114152417095857527450304064588327045566434613143149884391737286419623885764232620049541559250548525133540166835094146124824189204240031275094620798491331644219231576586550944407818428480069934923985835440814277.[/code] I found two other multipliers 1101311064 and 1101330536 giving the same 84 prime result. The closeness of the multipliers suggests that 100 primes is quite possible.

 mart_r 2022-03-10 21:16

Herr Ober, Zahlen bitte!

1 Attachment(s)
Data for maximal gaps for p < 3*10[SUP]13[/SUP] and k <= 109 is now publicly available! Rejoice!
I'm probably taking this up to p = 10[SUP]14[/SUP]. Well, unless anyone wants to join in.

Since the primes at the start of a maximal gap almost always* come in clusters, I did a quick check which p[SUB]n[/SUB] had the highest number of occurrences for k <= 100, for 3*10[SUP]13[/SUP] downwards:
[SIZE=1]* I know that may be a rather daring statement...[/SIZE]

[CODE]#occ p_n
2 29418557625949 (k = 11, 16)
4 29418557625841 (k = 13, 14, 17, 18)
21 29077945916363 (55 <= k <= 85)
23 1376589410333 (55 <= k <= 87)
30 16025473729 (52 <= k <= 98)
33 3099587 (48 <= k <= 100)
34 18313 (47 <= k <= 95)
39 1621 (24 <= k <= 96)
45 661 (18 <= k <= 100)
52 467 (9 <= k <= 99)
66 283 (6 <= k <= 100)
68 199 (2 <= k <= 96)
73 109 (2 <= k <= 100)
77 7
100 2[/CODE]2 and 3 always occur as primes preceding maximal gaps. 5 doesn't always occur since for p = 3 (technically p[SUB]2[/SUB] = 3), for some k, p[SUB]2+k[/SUB] and p[SUB]2+k+1[/SUB] are twin primes and in that case for p = 5 the gap length is the same as for p = 3. However, whenever 5 doesn't appear as a maximal gap, then 7 definitely does, and with respect to the number of occurrences, 7 is either in the lead by one or ties with 5. No p > 7 appears more often than p = 7 as a prime preceding a maximal gap for k = 1, 2, 3, ..., so p = 7 is a local maximum here.

But let's do this more formally:

Let [$]p_n[/$] be the set of prime numbers and [$]o_n(x)[/$] the set of the number of occurrences of [$]p_n[/$] as primes preceding a maximal gap for all positive integers [$]k <= x[/$].
[$]p_n = \{2, 3, 5, 7, 11, ...\}[/$]
[$]o_n(1) = \{1, 1, 0, 1, 0, 0, 0, 0, 1, 0, ...\}[/$]
[$]o_n(1000) = \{1000, 1000, 827, 828, 658, 781, 660, 783, 661, 416, ...\}[/$]

[$]o_n[/$] and the corresponding [$]p_n[/$] constitutes a local maximum for the above table - in this case for x = 100 - if there does not exist [$]m > n[/$] such that [$]o_m(x) > o_n(x)[/$].

Conjecture: as [$]k \to \infty[/$], the smallest [$]p_n[/$] in the above table with a local maximum of number of occurrences as maximal gap commencers will be fixed. 19 chimes in for a larger range of [$]k[/$], so the list of local maxima [$]p_n[/$] will probably start {2, 7, 19, 109, 199, 9439 (?), ...} for k sufficiently large - this appears to be [I]very[/I] tricky, at least numerically...

A follow-up question will be: for fixed x, at what point will the list of local maxima p[SUB]n[/SUB] be settled? For example, in the above table for x = 100, could there be a larger p[SUB]n[/SUB] preceding a maximal gap for more than half of the values of k (in which case o[SUB]n[/SUB] = 45 / p[SUB]n[/SUB] = 661 and possibly o[SUB]n[/SUB] = 52 / p[SUB]n[/SUB] = 467 will be superseded)? Or could there be a gap between consecutive primes so large that all - or at least most - of the p[SUB]n[/SUB] for k > 1 also turn out as maximal gaps?

Once creativity strikes... k = 6 is the first k for which p[SUB]n[/SUB] = 2, 3, 5, and 7 each start a maximal gap. For k = 12, all of the first five primes appear in the attached list. For k = 19, this makes six primes, and the first 13 (!) primes appear at k = 68 (so p[SUB]n+68[/SUB]-p[SUB]n[/SUB] becomes continually larger for every p[SUB]n[/SUB] <= 41). I bet MattcAnderson would like to see this sequence in the OEIS :wink:

I guess I'm biting off more than I can chew... :smile:

 mart_r 2022-03-16 22:06

[QUOTE=Bobby Jacobs;592658]For each k, what are the first few gaps with record CSG ratio? This is very interesting.[/QUOTE]
These are the current record CSG for each k @ p <= 3.9*10[SUP]13[/SUP]:
[CODE]k gap CSG p
1 766 0.8177620175 19581334192423
2 900 0.8918228764 21185697626083
3 986 0.9209295055 21185697625997
4 1034 0.9113778510 21185697625949
5 1080 0.9011654792 21185697625903
6 1154 0.8975282707 30103357357379
7 1148 0.8849957771 14580922576079
8 790 0.9265178066 11878096933
9 1316 0.9531616349 14580922575911
10 726 0.9509666672 866956873
11 754 0.9409492473 866956873
12 784 0.9363085666 866956873
13 1448 0.9564495245 5995661470529
14 1496 0.9574428891 5995661470481
15 1322 0.9535221550 396016668869
16 1358 0.9465344483 396016668833
17 1688 0.9836927546 8281634108801
18 1722 0.9710521630 8281634108767
19 1812 1.0165154301 8281634108677
20 1830 0.9880814955 8281634108677
21 1844 0.9563187743 8281634108663
22 1680 0.9463064905 968269822189
23 1890 0.9406396232 6200995919731
24 2134 0.9570149690 38986211476747
25 1780 0.9686207607 628177622389
26 2014 0.9341035539 6200995919683
27 1846 0.9534113552 628177622323
28 2088 0.9679949599 3999281381923
29 2116 0.9536970232 3999281381923
30 2400 0.9501210087 38029505632477
31 2478 0.9762139574 38986211476403
32 2524 0.9768240786 38986211476357
33 2560 0.9689295531 38986211476321
34 2286 0.9703645150 2481562496471
35 2320 0.9639271592 2481562496437
36 2616 0.9834171539 17931997861517
37 2396 0.9895774988 1933468592177
38 2444 0.9981020350 1933468592129
39 2472 0.9863866064 1933468592101
40 2538 0.9821956613 2481562496219
41 2760 0.9803005126 10631985435829
42 2380 0.9991966853 327076778191
43 2392 0.9719895984 327076778179
44 2442 0.9873916591 327076778129
45 2470 0.9784290501 327076778101
46 2762 0.9706117929 2481562496219
47 2520 0.9545666043 327076778051
48 2776 0.9415708602 1933468592101
49 3038 0.9415271787 10026387088493
50 3092 0.9531007373 10026387088439
51 2946 0.9460969948 2796148447381
52 2976 0.9382202652 2796148447381
53 3196 0.9187382475 11783179421593
54 3224 0.9279160571 10026387088493
55 3278 0.9396521374 10026387088439
56 3096 0.9237957124 2481562495661
57 3390 0.9461117876 11783179421371
58 3560 0.9395747528 29077945916363
59 3594 0.9376826431 28158788983159
60 3636 0.9343561260 29077945916363
61 3654 0.9164223001 29077945916363
62 3456 0.9287125490 5716399254341
63 3294 0.9469610659 1376589410369
64 3330 0.9464086867 1376589410333
65 3596 0.9378033618 6215409275507
66 3678 0.9740832743 6215409275249
67 3702 0.9617861382 6215409275249
68 3758 0.9762827903 6215409275249
69 3854 1.0242911884 6215409275249
70 3870 1.0052760984 6215409275249
71 3920 1.0147688787 6215409275249
72 3932 0.9927489370 6215409275237
73 3966 0.9891020412 6215409275041
74 4062 1.0366412505 6215409275041
75 4078 1.0180858187 6215409275041
76 4128 1.0276414005 6215409275041
77 4150 1.0142622729 6215409275407
78 4200 1.0238470491 6215409275357
79 4308 1.0809994193 6215409275249
80 4328 1.0659029505 6215409275249
81 4340 1.0444870805 6215409275237
82 4380 1.0459795515 6215409275177
83 4414 1.0426566161 6215409275143
84 4516 1.0944353381 6215409275041
85 4536 1.0796801338 6215409275041
86 4548 1.0586702538 6215409275029
87 4556 1.0347395141 6215409275021
88 4578 1.0221867581 6215409275041
89 4596 1.0066376308 6215409275041
90 4620 0.9959600976 6215409275041
91 4642 0.9838544524 6215409275041
92 5020 0.9684580361 36683716323913
93 5058 0.9781413471 33994032583531
94 5146 1.0006726694 36683716323913
95 5194 1.0063137564 36683716323913
96 5278 1.0371216659 36683716324039
97 5404 1.0977245069 36683716323913
98 5418 1.0792569593 36683716323899
99 5470 1.0876676245 36683716323847
100 5482 1.0680270856 36683716323847
101 5526 1.0708730803 36683716323791
102 5590 1.0876834546 36683716323913
103 5638 1.0933231416 36683716323913
104 5656 1.0781126752 36683716323847
105 5704 1.0837889389 36683716323847
106 5758 1.0936239342 36683716323913
107 5772 1.0758527238 36683716323899
108 5824 1.0843154811 36683716323847
109 5830 1.0612869894 36683716323841

Bonus: some instances CSG > 1 for k <= 1024 and p <= 2*10^12:
210 7700 1.0009864925 185067241757
211 7746 1.0126426509 185067241757
212 7760 1.0003343480 185067241757
213 7790 1.0000214554 185067241757[/CODE]

 Bobby Jacobs 2022-03-20 20:33

[QUOTE=mart_r;601471]Data for maximal gaps for p < 3*10[SUP]13[/SUP] and k <= 109 is now publicly available! Rejoice!
I'm probably taking this up to p = 10[SUP]14[/SUP]. Well, unless anyone wants to join in.

Since the primes at the start of a maximal gap almost always* come in clusters, I did a quick check which p[SUB]n[/SUB] had the highest number of occurrences for k <= 100, for 3*10[SUP]13[/SUP] downwards:
[SIZE=1]* I know that may be a rather daring statement...[/SIZE]

[CODE]#occ p_n
2 29418557625949 (k = 11, 16)
4 29418557625841 (k = 13, 14, 17, 18)
21 29077945916363 (55 <= k <= 85)
23 1376589410333 (55 <= k <= 87)
30 16025473729 (52 <= k <= 98)
33 3099587 (48 <= k <= 100)
34 18313 (47 <= k <= 95)
39 1621 (24 <= k <= 96)
45 661 (18 <= k <= 100)
52 467 (9 <= k <= 99)
66 283 (6 <= k <= 100)
68 199 (2 <= k <= 96)
73 109 (2 <= k <= 100)
77 7
100 2[/CODE]2 and 3 always occur as primes preceding maximal gaps. 5 doesn't always occur since for p = 3 (technically p[SUB]2[/SUB] = 3), for some k, p[SUB]2+k[/SUB] and p[SUB]2+k+1[/SUB] are twin primes and in that case for p = 5 the gap length is the same as for p = 3. However, whenever 5 doesn't appear as a maximal gap, then 7 definitely does, and with respect to the number of occurrences, 7 is either in the lead by one or ties with 5. No p > 7 appears more often than p = 7 as a prime preceding a maximal gap for k = 1, 2, 3, ..., so p = 7 is a local maximum here.

But let's do this more formally:

Let [$]p_n[/$] be the set of prime numbers and [$]o_n(x)[/$] the set of the number of occurrences of [$]p_n[/$] as primes preceding a maximal gap for all positive integers [$]k <= x[/$].
[$]p_n = \{2, 3, 5, 7, 11, ...\}[/$]
[$]o_n(1) = \{1, 1, 0, 1, 0, 0, 0, 0, 1, 0, ...\}[/$]
[$]o_n(1000) = \{1000, 1000, 827, 828, 658, 781, 660, 783, 661, 416, ...\}[/$]

[$]o_n[/$] and the corresponding [$]p_n[/$] constitutes a local maximum for the above table - in this case for x = 100 - if there does not exist [$]m > n[/$] such that [$]o_m(x) > o_n(x)[/$].

Conjecture: as [$]k \to \infty[/$], the smallest [$]p_n[/$] in the above table with a local maximum of number of occurrences as maximal gap commencers will be fixed. 19 chimes in for a larger range of [$]k[/$], so the list of local maxima [$]p_n[/$] will probably start {2, 7, 19, 109, 199, 9439 (?), ...} for k sufficiently large - this appears to be [I]very[/I] tricky, at least numerically...

A follow-up question will be: for fixed x, at what point will the list of local maxima p[SUB]n[/SUB] be settled? For example, in the above table for x = 100, could there be a larger p[SUB]n[/SUB] preceding a maximal gap for more than half of the values of k (in which case o[SUB]n[/SUB] = 45 / p[SUB]n[/SUB] = 661 and possibly o[SUB]n[/SUB] = 52 / p[SUB]n[/SUB] = 467 will be superseded)? Or could there be a gap between consecutive primes so large that all - or at least most - of the p[SUB]n[/SUB] for k > 1 also turn out as maximal gaps?

Once creativity strikes... k = 6 is the first k for which p[SUB]n[/SUB] = 2, 3, 5, and 7 each start a maximal gap. For k = 12, all of the first five primes appear in the attached list. For k = 19, this makes six primes, and the first 13 (!) primes appear at k = 68 (so p[SUB]n+68[/SUB]-p[SUB]n[/SUB] becomes continually larger for every p[SUB]n[/SUB] <= 41). I bet MattcAnderson would like to see this sequence in the OEIS :wink:

I guess I'm biting off more than I can chew... :smile:[/QUOTE]

How many times does 1327 appear in the list? 1327 has some big gaps to the next primes (1361, 1367, 1373, 1381, 1399, 1409, 1423). What about 1321? Since 1321 is near 1327, it should also appear a lot.

 mart_r 2022-03-21 22:08

1 Attachment(s)
[QUOTE=Bobby Jacobs;602186]How many times does 1327 appear in the list? 1327 has some big gaps to the next primes (1361, 1367, 1373, 1381, 1399, 1409, 1423). What about 1321? Since 1321 is near 1327, it should also appear a lot.[/QUOTE]

You're right. For small x, 1327 and some of the previous primes should occur quite often as primes preceding maximal gaps. For x >= 8, 1321 occurs more often than 1327, and for x >= 10, 1303 or 1307 occur more often than 1321.

Here's a list for the first 300 primes and the number of occurrences at x = 1000 (i.e. for all k <= 1000) - you clearly see the patterns juxtaposed to the gaps between the consecutive primes:
[CODE] p_n o_n(1000)
2 1000
3 1000
5 827
7 828
11 658
13 781
17 660
19 783
23 661
29 416
31 710
37 408
41 558
43 742
47 658
53 418
59 353
61 687
67 401
71 555
73 741
79 416
83 572
89 406
97 260
101 409
103 664
107 625
109 778
113 669
127 104
131 247
137 254
139 524
149 193
151 433
157 330
163 306
167 497
173 363
179 328
181 653
191 219
193 481
197 568
199 745
211 161
223 84
227 199
229 372
233 476
239 352
241 622
251 216
257 272
263 269
269 285
271 572
277 373
281 541
283 731
293 238
307 76
311 184
313 370
317 470
331 93
337 144
347 90
349 278
353 375
359 304
367 218
373 248
379 258
383 414
389 333
397 239
401 393
409 241
419 144
421 374
431 170
433 409
439 316
443 484
449 368
457 250
461 407
463 667
467 627
479 163
487 159
491 298
499 208
503 345
509 306
521 114
523 353
541 37
547 80
557 60
563 104
569 128
571 296
577 233
587 135
593 179
599 204
601 450
607 308
613 291
617 472
619 667
631 156
641 121
643 317
647 428
653 354
659 320
661 628
673 157
677 328
683 297
691 224
701 142
709 135
719 94
727 106
733 143
739 174
743 303
751 190
757 228
761 373
769 230
773 369
787 88
797 74
809 47
811 158
821 90
823 242
827 332
829 529
839 200
853 65
857 167
859 344
863 431
877 94
881 218
883 445
887 493
907 39
911 115
919 95
929 76
937 90
941 178
947 182
953 197
967 68
971 157
977 175
983 204
991 177
997 206
1009 87
1013 196
1019 208
1021 449
1031 182
1033 404
1039 310
1049 187
1051 416
1061 202
1063 434
1069 335
1087 47
1091 146
1093 314
1097 418
1103 342
1109 325
1117 249
1123 274
1129 285
1151 27
1153 97
1163 76
1171 82
1181 65
1187 96
1193 126
1201 116
1213 58
1217 143
1223 156
1229 185
1231 414
1237 291
1249 112
1259 92
1277 15
1279 70
1283 159
1289 167
1291 352
1297 271
1301 411
1303 600
1307 580
1319 164
1321 424
1327 335
1361 0
1367 7
1373 23
1381 22
1399 2
1409 3
1423 1
1427 9
1429 35
1433 64
1439 54
1447 44
1451 107
1453 227
1459 183
1471 71
1481 58
1483 177
1487 283
1489 439
1493 467
1499 336
1511 123
1523 63
1531 84
1543 49
1549 77
1553 167
1559 172
1567 151
1571 270
1579 190
1583 311
1597 85
1601 190
1607 211
1609 453
1613 486
1619 370
1621 657
1627 406
1637 226
1657 27
1663 59
1667 132
1669 303
1693 11
1697 49
1699 131
1709 89
1721 47
1723 147
1733 83
1741 94
1747 126
1753 158
1759 180
1777 24
1783 57
1787 136
1789 290
1801 99
1811 82
1823 45
1831 54
1847 16
1861 7
1867 18
1871 49
1873 113
1877 174
1879 301
1889 143
1901 75
1907 116
1913 143
1931 23
1933 102
1949 24
1951 93
1973 6
1979 17
1987 21
[/CODE]As one might expect, 1361 has 0 occurrences (the next prime with 0 occurrences for x = 1000 is 2203).
(Note also that 1621 occurs more often than 1303. This is mostly because there are rather many primes between 1400 and 1500 but rather few between 1700 and 1800 as well as between 1800 and 1900.)

The first time p[SUB]218[/SUB] = 1361 appears as a prime preceding a maximal gap is for k = 1315 because p[SUB]217+1315[/SUB] = p[SUB]1532[/SUB] = 12853 and p[SUB]218+1315[/SUB] = p[SUB]1533[/SUB] = 12889, which is a gap of 36 between consecutive primes (i.e. more than the 34 between 1327 and 1361) and a gap of 11528 between p[SUB]218[/SUB] and p[SUB]1533[/SUB], while for all n < 218, p[SUB]n+1315[/SUB]-p[SUB]n[/SUB] < 11528.

If you'd like to play around with a larger set of data, check out the attachment.:smile:

 Bobby Jacobs 2022-03-30 16:55

[QUOTE=mart_r;601471]
Conjecture: as [$]k \to \infty[/$], the smallest [$]p_n[/$] in the above table with a local maximum of number of occurrences as maximal gap commencers will be fixed. 19 chimes in for a larger range of [$]k[/$], so the list of local maxima [$]p_n[/$] will probably start {2, 7, 19, 109, 199, 9439 (?), ...} for k sufficiently large - this appears to be [I]very[/I] tricky, at least numerically...
[/QUOTE]

I believe that as [$]n\to\infty[/$], the primes p with the most occurrences will be based upon a lot of small prime gaps immediately before p. Therefore, 5659 should eventually beat 109 because the 5 prime gaps before 5659 are 6, 4, 2, 4, 2, but the 5 prime gaps before 109 are 8, 4, 2, 4, 2.

 mart_r 2022-04-13 20:26

1 Attachment(s)
[QUOTE=Bobby Jacobs;602880]I believe that as [$]n\to\infty[/$], the primes p with the most occurrences will be based upon a lot of small prime gaps immediately before p. Therefore, 5659 should eventually beat 109 because the 5 prime gaps before 5659 are 6, 4, 2, 4, 2, but the 5 prime gaps before 109 are 8, 4, 2, 4, 2.[/QUOTE]

p=5659 is not a good candidate for a record number of maximal gaps after p, as you can see in the attached graph. The graph shows p[SUB]n[/SUB] vs. o[SUB]n[/SUB](x) at x=500000. Points further to the right have a higher number of occurrences.
5659 is the 746th prime number. o[SUB]746[/SUB](x)=423464, while for p=9439, we already have o[SUB]1170[/SUB](x)=444555.
And, just as an aside, [$]\lim_{x\to\infty} x/o_n(x) = 1[/$] (working out secondary terms will be interesting;).
Whether 9439 would eventually beat 109 remains to be seen...

 mart_r 2022-04-22 17:11

What do you get if you multiply six by nine?

9439 beats 283 at around x=740000.
9439 does not appear to beat 199.
113173 may be the subsequent local maximum (beating 24109 for some x < 1.2e6). A lot more o[SUB]k[/SUB] and a lot higher bound x would need to be looked at to see whether that remains true.
Note that 113173 is the penultimate number of an almost-decuplet or cousin-nonuplet or whatever you may call it. So Bobby's observation holds true at this point, with my addition that some large gaps directly after such a cluster (or, say, (p-[$]\theta[/$](p))/[$]\sqrt{p}[/$] is not "too large", YMMV) make for good conditions to produce such "high performer" initial members of these generalized maximal gaps. We may invoke the performance indicator [$]\lim_{x\to\infty} \frac{x}{(\log x -1)(x-o_n(x))}[/$]. More sophisticated ideas are welcome.
In principle it might be possible that there exists a larger p that eventually beats 9439, or even 199 or 109 or...??
Intricate problem, delicate computation. Relocate focus? Allocate more resources? [COLOR="LemonChiffon"]Vindicate my existence??[/COLOR]

[CODE] k p_k o_k(1e6)
1 2 1000000
2 3 1000000
3 5 913974
4 7 913975
5 11 828143
6 13 901885
7 17 828145
8 19 901887
9 23 828146
10 29 681628
11 31 886659
12 37 680180
13 41 800714
14 43 896535
15 47 827790
16 53 681558
17 59 658923
18 61 883217
19 67 679222
20 71 800359
21 73 896477
22 79 681232
23 83 801182
24 89 678585
25 97 592056
26 101 752065
27 103 889285
28 107 825738
29 109 901630
30 113 828113
31 127 381766
32 131 641396
33 137 629027
34 139 864356
35 149 532451
36 151 807001
37 157 668832
38 163 655002
39 167 793753
40 173 676703
41 179 657575
42 181 882331
43 191 535553
44 193 808696
45 197 814221
46 199 899274
47 211 440323
48 223 366557
49 227 639491
50 229 823828
51 233 811478
52 239 678221
53 241 884641
54 251 536345
55 257 619570
56 263 637297
57 269 645947
58 271 875046
59 277 678153
60 281 799895
61 283 896333
62 293 538088
63 307 340314
64 311 607258
65 313 814055
66 317 807355
67 331 378875
68 337 535249
69 347 461147
70 349 761814
71 353 795136
72 359 673490
73 367 590485
74 373 629575
75 379 641650
76 383 785544
77 389 674505
78 397 590903
79 401 751480
80 409 594445
81 419 489062
82 421 784242
83 431 519907
84 433 800681
85 439 667121
86 443 795923
87 449 677548
88 457 591710
89 461 751923
90 463 889212
91 467 825736
92 479 440288
93 487 511336
94 491 705113
95 499 578974
96 503 746090
97 509 664344
98 521 421689
99 523 763580
100 541 271180
101 547 450118
102 557 429483
103 563 551413
104 569 601162
105 571 843445
106 577 669076
107 587 517671
108 593 609227
109 599 633704
110 601 866713
111 607 676096
112 613 657193
113 617 794421
114 619 894991
115 631 440101
116 641 449185
117 643 747316
118 647 793640
119 653 673934
120 659 656689
121 661 881502
122 673 438065
123 677 699049
124 683 649989
125 691 579297
126 701 484408
127 709 518248
128 719 461765
129 727 503357
130 733 585160
131 739 619697
132 743 774027
133 751 594239
134 757 631679
135 761 779383
136 769 597441
137 773 756587
138 787 375604
139 797 405533
140 809 343311
141 811 677349
142 821 485015
143 823 773652
144 827 798438
145 829 893732
146 839 537224
147 853 340043
148 857 606855
149 859 813837
150 863 807195
151 877 378877
152 881 638598
153 883 841158
154 887 813505
155 907 244026
156 911 503828
157 919 497066
158 929 443645
159 937 494496
160 941 691894
161 947 644162
162 953 644277
163 967 367061
164 971 621546
165 977 619750
166 983 634068
167 991 581393
168 997 624884
169 1009 412527
170 1013 674085
171 1019 641875
172 1021 866845
173 1031 533531
174 1033 807228
175 1039 668959
176 1049 518833
177 1051 798028
178 1061 526147
179 1063 802249
180 1069 667699
181 1087 271076
182 1091 552183
183 1093 776155
184 1097 796662
185 1103 674267
186 1109 656548
187 1117 588379
188 1123 628691
189 1129 641397
190 1151 206487
191 1153 504779
192 1163 433703
193 1171 476260
194 1181 442801
195 1187 560904
196 1193 605981
197 1201 562730
198 1213 393293
199 1217 655929
200 1223 631357
201 1229 641244
202 1231 871744
203 1237 676947
204 1249 424889
205 1259 442089
206 1277 230001
207 1279 537647
208 1283 688222
209 1289 635527
210 1291 860410
211 1297 673956
212 1301 797723
213 1303 895422
214 1307 827464
215 1319 440624
216 1321 774222
217 1327 659014
218 1361 79813
219 1367 209066
220 1373 340459
221 1381 389501
222 1399 198160
223 1409 279261
224 1423 223083
225 1427 455166
226 1429 679754
227 1433 730388
228 1439 642468
229 1447 572724
230 1451 738132
231 1453 879575
232 1459 676456
233 1471 424651
234 1481 441874
235 1483 737786
236 1487 790351
237 1489 889188
238 1493 826028
239 1499 681223
240 1511 425957
241 1523 358233
242 1531 460726
243 1543 356252
244 1549 512475
245 1553 700593
246 1559 644827
247 1567 578889
248 1571 743381
249 1579 591731
250 1583 752116
251 1597 375099
252 1601 632095
253 1607 625731
254 1609 862911
255 1613 817332
256 1619 679959
257 1621 886123
258 1627 680141
259 1637 521397
260 1657 208206
261 1663 390702
262 1667 604307
263 1669 802036
264 1693 170780
265 1697 423178
266 1699 663931
267 1709 484307
268 1721 374835
269 1723 704772
270 1733 497014
271 1741 517825
272 1747 595137
273 1753 623020
274 1759 639435
275 1777 265861
276 1783 442245
277 1787 669006
278 1789 830933
279 1801 430556
280 1811 444024
281 1823 361014
282 1831 445895
283 1847 273720
284 1861 233467
285 1867 400434
286 1871 610121
287 1873 793294
288 1877 789955
289 1879 885866
290 1889 535359
291 1901 396111
292 1907 544980
293 1913 602869
294 1931 258459
295 1933 599789
296 1949 296307
297 1951 619466
298 1973 188985
299 1979 364879
300 1987 421153
301 1993 519458
302 1997 705400
303 1999 849964
304 2003 811377
305 2011 600373
306 2017 633940
307 2027 506154
308 2029 791754
309 2039 524056
310 2053 335861
311 2063 383029
312 2069 517738
313 2081 376196
314 2083 709380
315 2087 768481
316 2089 882615
317 2099 534823
318 2111 396210
319 2113 730259
320 2129 325708
321 2131 650994
322 2137 619950
323 2141 773393
324 2143 885306
325 2153 536756
326 2161 539390
327 2179 248779
328 2203 103983
329 2207 301353
330 2213 407594
331 2221 435477
332 2237 261184
333 2239 564008
334 2243 688647
335 2251 556641
336 2267 304289
337 2269 627988
338 2273 733979
339 2281 578974
340 2287 623886
341 2293 637550
342 2297 783865
343 2309 435095
344 2311 769225
345 2333 208722
346 2339 389671
347 2341 664115
348 2347 616289
349 2351 767295
350 2357 667379
351 2371 369003
352 2377 528523
353 2381 714310
354 2383 868899
355 2389 675807
356 2393 798560
357 2399 677930
358 2411 425375
359 2417 563845
360 2423 612280
361 2437 360831
362 2441 614207
363 2447 616654
364 2459 408719
365 2467 494829
366 2473 582726
367 2477 744373
368 2503 149821
369 2521 122824
370 2531 198653
371 2539 286461
372 2543 482322
373 2549 516578
374 2551 763367
375 2557 633623
376 2579 202834
377 2591 238824
378 2593 527746
379 2609 275415
380 2617 373286
381 2621 601298
382 2633 384112
383 2647 293422
384 2657 345619
385 2659 651972
386 2663 729281
387 2671 576743
388 2677 619995
389 2683 635299
390 2687 781478
391 2689 889819
392 2693 825487
393 2699 680961
394 2707 592895
395 2711 752225
396 2713 889327
397 2719 679804
398 2729 521338
399 2731 800345
400 2741 526548
401 2749 533833
402 2753 727666
403 2767 369050
404 2777 402203
405 2789 341725
406 2791 673881
407 2797 619118
408 2801 768669
409 2803 884785
410 2819 348263
411 2833 267563
412 2837 536535
413 2843 576410
414 2851 544850
415 2857 604937
416 2861 762727
417 2879 276501
418 2887 403023
419 2897 398584
420 2903 524835
421 2909 587106
422 2917 555130
423 2927 470360
424 2939 368898
425 2953 291244
426 2957 539196
427 2963 578023
428 2969 609911
429 2971 853615
430 2999 135663
431 3001 377224
432 3011 375081
433 3019 435537
434 3023 646243
435 3037 344138
436 3041 600602
437 3049 540405
438 3061 384483
439 3067 534120
440 3079 380813
441 3083 646399
442 3089 628391
443 3109 229125
444 3119 298909
445 3121 609687
446 3137 296193
447 3163 96427
448 3167 273277
449 3169 522994
450 3181 337380
451 3187 485383
452 3191 677429
453 3203 404609
454 3209 544594
455 3217 538341
456 3221 712941
457 3229 581473
458 3251 191377
459 3253 493381
460 3257 662046
461 3259 827402
462 3271 428970
463 3299 110859
464 3301 328491
465 3307 439934
466 3313 523151
467 3319 577109
468 3323 744830
469 3329 657443
470 3331 871040
471 3343 436091
472 3347 697601
473 3359 419318
474 3361 749465
475 3371 511805
476 3373 794333
477 3389 339942
478 3391 663593
479 3407 317447
480 3413 485373
481 3433 196669
482 3449 177667
483 3457 283750
484 3461 496750
485 3463 710739
486 3467 748381
487 3469 864755
488 3491 216373
489 3499 325129
490 3511 295169
491 3517 454675
492 3527 426576
493 3529 706953
494 3533 768968
495 3539 662261
496 3541 874313
497 3547 677090
498 3557 520352
499 3559 799201
500 3571 429423
501 3581 444069
502 3583 742622
503 3593 511697
504 3607 331423
505 3613 490540
506 3617 698211
507 3623 643396
508 3631 578801
509 3637 623427
510 3643 638642
511 3659 328517
512 3671 316903
513 3673 628232
514 3677 738302
515 3691 365020
516 3697 523418
517 3701 714872
518 3709 576977
519 3719 482730
520 3727 516720
521 3733 594282
522 3739 624150
523 3761 203934
524 3767 384383
525 3769 656480
526 3779 481453
527 3793 319156
528 3797 583260
529 3803 599607
530 3821 256905
531 3823 594116
532 3833 455338
533 3847 314010
534 3851 573882
535 3853 792200
536 3863 514446
537 3877 333267
538 3881 598369
539 3889 539793
540 3907 246959
541 3911 510676
542 3917 568363
543 3919 813421
544 3923 802319
545 3929 675323
546 3931 883218
547 3943 438508
548 3947 699625
549 3967 230279
550 3989 120105
551 4001 167646
552 4003 414702
553 4007 561937
554 4013 564455
555 4019 595016
556 4021 835490
557 4027 663485
558 4049 209084
559 4051 506397
560 4057 548296
561 4073 305295
562 4079 473101
563 4091 359147
564 4093 684769
565 4099 623089
566 4111 409079
567 4127 276614
568 4129 583433
569 4133 719779
570 4139 650097
571 4153 364128
572 4157 622098
573 4159 832491
574 4177 277476
575 4201 111320
576 4211 199920
577 4217 341369
578 4219 586705
579 4229 439823
580 4231 719258
581 4241 497506
582 4243 775619
583 4253 517713
584 4259 608896
585 4261 846449
586 4271 530686
587 4273 804171
588 4283 527014
589 4289 615397
590 4297 566324
591 4327 95183
592 4337 183912
593 4339 422848
594 4349 374044
595 4357 428942
596 4363 528104
597 4373 455967
598 4391 229980
599 4397 403067
600 4409 326359
601 4421 304593
602 4423 625756
603 4441 243684
604 4447 417029
605 4451 634768
606 4457 612525
607 4463 626706
608 4481 262313
609 4483 604206
610 4493 458281
611 4507 315772
612 4513 476125
613 4517 680971
614 4519 846122
615 4523 810555
616 4547 177283
617 4549 483289
618 4561 343944
619 4567 494533
620 4583 283253
621 4591 386199
622 4597 504278
623 4603 573504
624 4621 250495
625 4637 209797
626 4639 490986
627 4643 650211
628 4649 616206
629 4651 842041
630 4657 667221
631 4663 652380
632 4673 514126
633 4679 608046
634 4691 408362
635 4703 350887
636 4721 201689
637 4723 514830
638 4729 552458
639 4733 716275
640 4751 268043
641 4759 395347
642 4783 129670
643 4787 342164
644 4789 592210
645 4793 689211
646 4799 631082
647 4801 854264
648 4813 432619
649 4817 693423
650 4831 356979
651 4861 78321
652 4871 157711
653 4877 284942
654 4889 253467
655 4903 216658
656 4909 363386
657 4919 355502
658 4931 304835
659 4933 610047
660 4937 699828
661 4943 629358
662 4951 566710
663 4957 613674
664 4967 495362
665 4969 782624
666 4973 801797
667 4987 377781
668 4993 534444
669 4999 599716
670 5003 756510
671 5009 666924
672 5011 880114
673 5021 535484
674 5023 808415
675 5039 342864
676 5051 324946
677 5059 420624
678 5077 216155
679 5081 467518
680 5087 537471
681 5099 377278
682 5101 706380
683 5107 631773
684 5113 637824
685 5119 643508
686 5147 129819
687 5153 287294
688 5167 225853
689 5171 461103
690 5179 451590
691 5189 417937
692 5197 468058
693 5209 352977
694 5227 202754
695 5231 454876
696 5233 696563
697 5237 752628
698 5261 170833
699 5273 215548
700 5279 365958
701 5281 649499
702 5297 296749
703 5303 461695
704 5309 551476
705 5323 333348
706 5333 374450
707 5347 283052
708 5351 529725
709 5381 86656
710 5387 222602
711 5393 345814
712 5399 454542
713 5407 473749
714 5413 550162
715 5417 715617
716 5419 854932
717 5431 431440
718 5437 566155
719 5441 746288
720 5443 875900
721 5449 676516
722 5471 211813
723 5477 393178
724 5479 665294
725 5483 750823
726 5501 272919
727 5503 610455
728 5507 726831
729 5519 420942
730 5521 756797
731 5527 652803
732 5531 788054
733 5557 152766
734 5563 315357
735 5569 450930
736 5573 639919
737 5581 546089
738 5591 464987
739 5623 75406
740 5639 94364
741 5641 279633
742 5647 369528
743 5651 549308
744 5653 738664
745 5657 754116
746 5659 866159
747 5669 529323
748 5683 337199
749 5689 494898
750 5693 700771
751 5701 569625
752 5711 480614
753 5717 588250
754 5737 222931
755 5741 472373
756 5743 735088
757 5749 636933
758 5779 98556
759 5783 303754
760 5791 356671
761 5801 370129
762 5807 498805
763 5813 562457
764 5821 535155
765 5827 596891
766 5839 400977
767 5843 662942
768 5849 635659
769 5851 861144
770 5857 674372
771 5861 798099
772 5867 677774
773 5869 884993
774 5879 536627
775 5881 809144
776 5897 343037
777 5903 506691
778 5923 203015
779 5927 451007
780 5939 338724
781 5953 271850
782 5981 79755
783 5987 199621
784 6007 110553
785 6011 278033
786 6029 148551
787 6037 252036
788 6043 366262
789 6047 547288
790 6053 543424
791 6067 323918
792 6073 479162
793 6079 556311
794 6089 466903
795 6091 752996
796 6101 508283
797 6113 384133
798 6121 464336
799 6131 433106
800 6133 733163
801 6143 504178
802 6151 522392
803 6163 378114
804 6173 411697
805 6197 137417
806 6199 401294
807 6203 573597
808 6211 515343
809 6217 583202
810 6221 746307
811 6229 584812
812 6247 257411
813 6257 338136
814 6263 480581
815 6269 561277
816 6271 810072
817 6277 659013
818 6287 513749
819 6299 388798
820 6301 719606
821 6311 503707
822 6317 600384
823 6323 629109
824 6329 641672
825 6337 582583
826 6343 625715
827 6353 501827
828 6359 600002
829 6361 845947
830 6367 672339
831 6373 655823
832 6379 652347
833 6389 515089
834 6397 528125
835 6421 152946
836 6427 315056
837 6449 138694
838 6451 380652
839 6469 183478
840 6473 420139
841 6481 423333
842 6491 404445
843 6521 79287
844 6529 179733
845 6547 120927
846 6551 295332
847 6553 518544
848 6563 398341
849 6569 510574
850 6571 755422
851 6577 631520
852 6581 767546
853 6599 275786
854 6607 400963
855 6619 331026
856 6637 193913
857 6653 175197
858 6659 326081
859 6661 587931
860 6673 360583
861 6679 503414
862 6689 449629
863 6691 732055
864 6701 504185
865 6703 782017
866 6709 658984
867 6719 514820
868 6733 330626
869 6737 598769
870 6761 155922
871 6763 444468
872 6779 247825
873 6781 552518
874 6791 441278
875 6793 727156
876 6803 501444
877 6823 202920
878 6827 457719
879 6829 715507
880 6833 758735
881 6841 587145
882 6857 313259
883 6863 477205
884 6869 570412
885 6871 819870
886 6883 428021
887 6899 284549
888 6907 387801
889 6911 620493
890 6917 611911
891 6947 96715
892 6949 333305
893 6959 328100
894 6961 620277
895 6967 589051
896 6971 742396
897 6977 655567
898 6983 647537
899 6991 584163
900 6997 626478
901 7001 774720
902 7013 432865
903 7019 569419
904 7027 554772
905 7039 392107
906 7043 652035
907 7057 350636
908 7069 327327
909 7079 373455
910 7103 127442
911 7109 274851
912 7121 257577
913 7127 406696
914 7129 676893
915 7151 190092
916 7159 298240
917 7177 177273
918 7187 259746
919 7193 396678
920 7207 267741
921 7211 507210
922 7213 727592
923 7219 620679
924 7229 495545
925 7237 515224
926 7243 589911
927 7247 756526
928 7253 663797
929 7283 100673
930 7297 136380
931 7307 202696
932 7309 456225
933 7321 311782
934 7331 350593
935 7333 637481
936 7349 299132
937 7351 609703
938 7369 243694
939 7393 101571
940 7411 92086
941 7417 209683
942 7433 159480
943 7451 115373
944 7457 237882
945 7459 458353
946 7477 190972
947 7481 419437
948 7487 485089
949 7489 718144
950 7499 482623
951 7507 500708
952 7517 450680
953 7523 562536
954 7529 604751
955 7537 560954
956 7541 731018
957 7547 657245
958 7549 874039
959 7559 533420
960 7561 806029
961 7573 431111
962 7577 693945
963 7583 647800
964 7589 648250
965 7591 874560
966 7603 437384
967 7607 698495
968 7621 358362
969 7639 209942
970 7643 462514
971 7649 532784
972 7669 209623
973 7673 449842
974 7681 465751
975 7687 557140
976 7691 723945
977 7699 578417
978 7703 742997
979 7717 372437
980 7723 529536
981 7727 718094
982 7741 366036
983 7753 335167
984 7757 586816
985 7759 805664
986 7789 101290
987 7793 310708
988 7817 107529
989 7823 238258
990 7829 362089
991 7841 294758
992 7853 276436
993 7867 237917
994 7873 388145
995 7877 587133
996 7879 770904
997 7883 770281
998 7901 273698
999 7907 450006
1000 7919 350255
1001 7927 447230
1002 7933 548613
1003 7937 718802
1004 7949 417802
1005 7951 753233
1006 7963 419300
1007 7993 83831
1008 8009 107456
1009 8011 299059
1010 8017 386665
1011 8039 149072
1012 8053 154876
1013 8059 291640
1014 8069 314601
1015 8081 278252
1016 8087 422275
1017 8089 677719
1018 8093 725639
1019 8101 564015
1020 8111 474186
1021 8117 580411
1022 8123 614559
1023 8147 162735
1024 8161 184935
1025 8167 335236
1026 8171 539215
1027 8179 495718
1028 8191 362521
1029 8209 204301
1030 8219 291170
1031 8221 567386
1032 8231 444250
1033 8233 727774
1034 8237 773312
1035 8243 663068
1036 8263 235989
1037 8269 417567
1038 8273 619215
1039 8287 342851
1040 8291 598860
1041 8293 814501
1042 8297 801132
1043 8311 378146
1044 8317 534439
1045 8329 383350
1046 8353 134075
1047 8363 224221
1048 8369 368955
1049 8377 412013
1050 8387 394147
1051 8389 680917
1052 8419 93879
1053 8423 293000
1054 8429 408254
1055 8431 662652
1056 8443 385953
1057 8447 646304
1058 8461 341841
1059 8467 504484
1060 8501 69186
1061 8513 116949
1062 8521 202233
1063 8527 315343
1064 8537 321914
1065 8539 585546
1066 8543 680144
1067 8563 219319
1068 8573 287906
1069 8581 387302
1070 8597 244204
1071 8599 542087
1072 8609 433592
1073 8623 297926
1074 8627 552710
1075 8629 770476
1076 8641 415269
1077 8647 554279
1078 8663 306473
1079 8669 475503
1080 8677 489320
1081 8681 691717
1082 8689 567613
1083 8693 738977
1084 8699 661015
1085 8707 586511
1086 8713 627340
1087 8719 640503
1088 8731 417157
1089 8737 558055
1090 8741 744102
1091 8747 663209
1092 8753 652517
1093 8761 586277
1094 8779 258670
1095 8783 523790
1096 8803 200263
1097 8807 446712
1098 8819 335205
1099 8821 658715
1100 8831 475262
1101 8837 579208
1102 8839 828177
1103 8849 524644
1104 8861 391986
1105 8863 725742
1106 8867 781045
1107 8887 240885
1108 8893 422612
1109 8923 80478
1110 8929 208909
1111 8933 409046
1112 8941 416152
1113 8951 393585
1114 8963 325890
1115 8969 479337
1116 8971 747736
1117 8999 127243
1118 9001 360626
1119 9007 464505
1120 9011 660889
1121 9013 818627
1122 9029 337805
1123 9041 320627
1124 9043 629664
1125 9049 607921
1126 9059 494063
1127 9067 516754
1128 9091 150623
1129 9103 198792
1130 9109 346340
1131 9127 185103
1132 9133 341617
1133 9137 558076
1134 9151 310334
1135 9157 467711
1136 9161 665337
1137 9173 401783
1138 9181 480776
1139 9187 571163
1140 9199 393381
1141 9203 652871
1142 9209 630918
1143 9221 411875
1144 9227 553895
1145 9239 387908
1146 9241 731940
1147 9257 323508
1148 9277 166449
1149 9281 398003
1150 9283 651804
1151 9293 470813
1152 9311 234415
1153 9319 358320
1154 9323 573906
1155 9337 328114
1156 9341 581934
1157 9343 798460
1158 9349 656105
1159 9371 207995
1160 9377 388085
1161 9391 271152
1162 9397 437220
1163 9403 530335
1164 9413 458656
1165 9419 567130
1166 9421 815835
1167 9431 522055
1168 9433 796818
1169 9437 809480
1170 9439 896807
1171 9461 220160
1172 9463 526660
1173 9467 691318
1174 9473 640024
1175 9479 642888
1176 9491 417162
1177 9497 557734
1178 9511 344895
1179 9521 380990
1180 9533 331294
1181 9539 485629
1182 9547 508534
1183 9551 691160
1184 9587 63385
1185 9601 95979
1186 9613 130162
1187 9619 247563
1188 9623 418077
1189 9629 464520
1190 9631 708552
1191 9643 389335
1192 9649 529232
1193 9661 374089
1194 9677 261811
1195 9679 562329
1196 9689 453557
1197 9697 488792
1198 9719 176513
1199 9721 459824
1200 9733 333283
1201 9739 482070
1202 9743 683872
1203 9749 633336
1204 9767 263156
1205 9769 602146
1206 9781 381785
1207 9787 531735
1208 9791 718107
1209 9803 419918
1210 9811 495878
1211 9817 583689
1212 9829 399246
1213 9833 659599
1214 9839 635254
1215 9851 413756
1216 9857 555795
1217 9859 826057
1218 9871 429932
1219 9883 362286
1220 9887 633945
1221 9901 341356
1222 9907 506371
1223 9923 290652
1224 9929 457519
1225 9931 736097
1226 9941 501827
1227 9949 519633
1228 9967 243664
1229 9973 418661
1230 10007 63093
1231 10009 226219
1232 10037 64385
1233 10039 212523
1234 10061 96217
1235 10067 212622
(...)
2684 24109 889952
:727 113173 889409
[/CODE]

For these k, the first n primes are preceding generalized maximal gaps p[SUB]n+k[/SUB]-p[SUB]n[/SUB]:
[CODE] n k
2 1
3 2
4 6
5 12
6 19
7 97
8 70
9 120
10 88
11 119
12 237
13 68
14 681
15 412
16 1591
17 2907
18 1510
19 2734
20 2131
21 1588
22 3834
23 6041
24 2897
25 11562
26 21004
27 11560
28 44194
29 21001
30 11557
31 25174
32 32114
33 131271
34 36918
35 44636
36 115242
37 211442
38 477957
39 64935
40 204412
41 710665
42 175930
43 438049
44 409641
45 725804
46 176350
47 560510
48 2570641
49 2841381
50 4094784
51 1063896
52 4355669
53 1807346
54 2070798
55 2349691
56 6380527
57 6563887
58 6276812
59 14215737
60 8543349
61 2899899
62 7714640
63 19264207
64 15644556
65 13668980
66 10701209
67 24451150
68 13668996
69 38417236
70 33907310
71 25958214
72 37376935
73 72210305
74 51624533
75 155807588
76 121101282
77 72019160
78 199395703
79 34335444
80 80104183
81 575130837
82 273221126
83 362546538
84 478749161
85 209832527
86 92967699
87 251653222
90 833367050
91 566487675
92 212341969
93 838711510
94 394795699
97 457331290
99 864115614
107 834990586

Search limit: k=9e8
[/CODE]

And now for the cherry on top of it:
For 25698372294281 <= p <= 25698372297167 there are 144 values of k with 302 <= k <= 445 for which a new CSG maximum is > 1, with the largest instance at p = 25698372297029, k = 316, CSG = 1.09729237...

Ah, the fun we have :smile:

 mart_r 2022-04-23 15:59

[QUOTE=mart_r;604557]Relocate focus?[/QUOTE]

That's what. You know, even though I don't get many replies, it helps that I share my ideas here as it puts more pressure on me to think things through more thoroughly (try saying that five times fast:), beneath all my rampant numerology.

[QUOTE=Bobby Jacobs;602880]I believe that as [$]n\to\infty[/$], the primes p with the most occurrences will be based upon a lot of small prime gaps immediately before p. Therefore, 5659 should eventually beat 109 because the 5 prime gaps before 5659 are 6, 4, 2, 4, 2, but the 5 prime gaps before 109 are 8, 4, 2, 4, 2.[/QUOTE]

That seems to be right after all - I stand corrected. Those "high performer" primes preceding maximal gaps depend primarily on the small gaps right before them. I can see it now - it might be well out of reach for an actual computation, but on an asymptotic scale, 5659, being the last member of a prime-septuplet, does have a good chance to beat 109 sometime.

 Bobby Jacobs 2022-04-25 19:08

What is the pattern with the sequence of primes with record low numbers of occurrences? It seems like the sequence is 2, 5, 11, 29, 37, 59, 97, 127, 223, 307, 541, 907, 1151, 1361, ... This is similar to the primes at the end of maximal prime gaps, but not exactly. I wonder what the pattern is.

 mart_r 2022-04-26 09:18

Me too :smile:
At first sight, 37 should occur more often than 29 because the two gaps preceding 37 are {2, 6} instead of {4, 6} for 29. If however we take three gaps before the prime into account, it's {6, 2, 6} vs. {2, 4, 6}. The {2, 4, 6}-pattern having more open residues mod 5 also plays a role, favoring 37 as a local record minimum in number of occurrences. Now, at what margin remains 37 below 29?

 Bobby Jacobs 2022-04-29 23:22

Forbidden prime gap combinations

Let an n-prime gap be the gap between a prime p and the prime n primes after p. Then, 2 and 3 are always the start of a maximal n-gap for all n. 5 is the start of a maximal n-gap if and only if the (n+2)nd prime and the (n+3)rd prime are not twin primes. 7 is the start of a maximal n-gap if and only if the (n+3)rd prime and the (n+4)th prime are not twin primes. 11 is the start of a maximal n-gap if and only if the (n+4)th and (n+5)th primes have a gap greater than 4. 13 is the start of a maximal n-gap if and only if the (n+5)th and (n+6)th primes are not twin primes, and the last 2 gaps before the (n+6)th prime are not (2, 4). Basically, every prime has a set of "forbidden prime gap combinations" such that the mth prime is the start of a maximal n-gap if and only if the last gaps before the (m+n)th prime are not one of the forbidden gap combinations. Here are the forbidden gap combinations of the first few primes.

[CODE]
2
[]
3
[]
5
[[2]]
7
[[2]]
11
[[2], [4]]
13
[[2], [2, 4]]
17
[[2], [4]]
19
[[2], [2, 4]]
23
[[2], [4]]
29
[[2], [4], [6]]
31
[[2], [2, 4], [2, 6], [2, 6, 4], [2, 4, 6]]
37
[[2], [4], [6], [2, 4, 8], [2, 4, 2, 10]]
41
[[2], [4], [2, 6], [4, 6], [2, 4, 6, 6], [4, 2, 4, 8], [2, 4, 2, 10]]
43
[[2], [2, 4], [2, 6, 4], [4, 2, 6], [2, 4, 6], [2, 4, 6, 2, 6], [2, 4, 2, 4, 8]]
47
[[2], [4], [4, 2, 4, 6], [4, 2, 4, 6, 2, 6], [4, 2, 4, 2, 4, 8]]
[/CODE]

Notice that 29 just has the forbidden gaps 2, 4, 6, but 37 has the extra combinations (2, 4, 8) and (2, 4, 2, 10). That is why 29 is more common than 37.

 mart_r 2022-05-01 14:56

[QUOTE=Bobby Jacobs;604986]Here are the forbidden gap combinations of the first few primes.
[/QUOTE]

Very good! That's the sort of analysis I was looking for.
Do you have a program for these gap combinations?

 Bobby Jacobs 2022-05-11 16:28

Yes. I have a program, but it is slow for primes above 47. We basically want admissible k-tuples where the total of the gaps is less than or equal to the total of the k gaps before p. Let p[SUB]m[/SUB] be the mth prime. Suppose the k gaps before the (m+n)th prime are one of these forbidden k-tuples. If p[SUB]m+n[/SUB]-p[SUB]m+n-k[/SUB]<=p[SUB]m[/SUB]-p[SUB]m-k[/SUB], then p[SUB]m+n-k[/SUB]-p[SUB]m-k[/SUB]>=p[SUB]m+n[/SUB]-p[SUB]m[/SUB]. Then, the (m-k)th prime will have at least as big of an n-gap as the mth prime. Therefore, the forbidden gaps are minimal admissible k-tuples >= the k gaps before p[SUB]m[/SUB].

 mart_r 2022-05-17 17:02

CSG[SUB]max[/SUB] for p<=10[SUP]14[/SUP]:
[CODE] k gap CSG_max p
1 766 0.81776202 19581334192423
2 900 0.89182288 21185697626083
3 986 0.92092951 21185697625997
4 1134 0.93874248 66592576389587
5 1170 0.91718026 66592576389551
6 1154 0.89752827 30103357357379
7 1148 0.88499578 14580922576079
8 790 0.92651781 11878096933
9 1316 0.95316163 14580922575911
10 726 0.95096666 866956873
11 754 0.94094924 866956873
12 784 0.93630856 866956873
13 1448 0.95644952 5995661470529
14 1496 0.95744289 5995661470481
15 1322 0.95352216 396016668869
16 1358 0.94653445 396016668833
17 1688 0.98369275 8281634108801
18 1722 0.97105216 8281634108767
19 1812 1.01651543 8281634108677
20 1830 0.98808150 8281634108677
21 2134 1.02168813 78736011999913
22 2148 0.99072269 78736011999913
23 2166 0.96394446 78736011999913
24 2310 1.04764008 78736011999913
25 2322 1.01591301 78736011999901
26 2338 0.98829568 78736011999913
27 2376 0.98009540 78736011999847
28 2432 0.98752862 78736011999791
29 2454 0.96623635 78736011999769
30 2494 0.96053115 78736011999913
31 2478 0.97621396 38986211476403
32 2524 0.97682408 38986211476357
33 2560 0.96892955 38986211476321
34 2286 0.97036452 2481562496471
35 2320 0.96392716 2481562496437
36 2616 0.98341715 17931997861517
37 2396 0.98957750 1933468592177
38 2444 0.99810203 1933468592129
39 2472 0.98638661 1933468592101
40 2538 0.98219566 2481562496219
41 2760 0.98030051 10631985435829
42 2380 0.99919669 327076778191
43 2392 0.97198960 327076778179
44 2442 0.98739166 327076778129
45 2470 0.97842905 327076778101
46 2762 0.97061179 2481562496219
47 2520 0.95456660 327076778051
48 2776 0.94157086 1933468592101
49 3038 0.94152718 10026387088493
50 3092 0.95310074 10026387088439
51 2946 0.94609699 2796148447381
52 2976 0.93822027 2796148447381
53 3450 0.93208471 60681682061173
54 3224 0.92791606 10026387088493
55 3278 0.93965214 10026387088439
56 3096 0.92379571 2481562495661
57 3390 0.94611179 11783179421371
58 3560 0.93957475 29077945916363
59 3808 0.96141677 90210824580841
60 3764 0.95339422 55956455554739
61 3798 0.94719704 55956455554739
62 3852 0.95602954 55956455554651
63 3942 0.99181087 55956455554561
64 3976 0.98566033 55956455554561
65 4004 1.00012038 45921691543349
66 4020 0.98072956 45921691543333
67 4086 0.99893031 45921691543267
68 4140 1.00814094 45921691543213
69 3854 1.02429119 6215409275249
70 4292 1.05955757 45921691543061
71 4310 1.04178765 45921691543043
72 4332 1.02721666 45921691543061
73 4386 1.03648387 45921691543061
74 4062 1.03664125 6215409275041
75 4078 1.01808582 6215409275041
76 4128 1.02764140 6215409275041
77 4150 1.01426227 6215409275407
78 4200 1.02384705 6215409275357
79 4308 1.08099942 6215409275249
80 4328 1.06590295 6215409275249
81 4340 1.04448708 6215409275237
82 4380 1.04597955 6215409275177
83 4414 1.04265662 6215409275143
84 4516 1.09443534 6215409275041
85 4536 1.07968013 6215409275041
86 4548 1.05867025 6215409275029
87 4556 1.03473951 6215409275021
88 4578 1.02218676 6215409275041
89 4596 1.00663763 6215409275041
90 4620 0.99596010 6215409275041
91 4642 0.98385445 6215409275041
92 5020 0.96845804 36683716323913
93 5058 0.97814135 33994032583531
94 5146 1.00067267 36683716323913
95 5194 1.00631376 36683716323913
96 5278 1.03712167 36683716324039
97 5404 1.09772451 36683716323913
98 5418 1.07925696 36683716323899
99 5470 1.08766762 36683716323847
100 5482 1.06802709 36683716323847
101 5526 1.07087308 36683716323791
102 5590 1.08768345 36683716323913
103 5638 1.09332314 36683716323913
104 5656 1.07811268 36683716323847
105 5704 1.08378894 36683716323847
106 5758 1.09362393 36683716323913
107 5772 1.07585272 36683716323899
108 5824 1.08431548 36683716323847
109 5830 1.06128699 36683716323841
[/CODE]

And just above 10[SUP]14[/SUP], these 22 new records showed up:
[CODE] 10 1528 0.96314466 102591551174059
11 1560 0.94298881 102591551174027
50 3450 0.97333053 102267713449991
51 3480 0.96260938 102267713449991
52 3562 0.99122668 102267713449879
53 3592 0.98063297 102267713449879
54 3634 0.97918812 102267713449807
55 3684 0.98379105 102267713449757
56 3714 0.97357591 102267713449757
57 3768 0.98125523 102267713449673
58 3798 0.97126377 102267713449673
59 3834 0.96582204 102267713449607
60 3874 0.96340363 102267713449567
61 3904 0.95381038 102267713449567
62 3958 0.96169379 102267713449483
66 4186 1.00199403 102267713449117
68 4324 1.03945196 102267713449117
69 4354 1.03013486 102267713449117
76 4658 1.03478754 101562452774609
77 4694 1.03029216 101562452774609
92 5304 1.01634058 102267713449117
93 5328 1.00471893 102267713449093
[/CODE]

@ Bobby: I'm working on a program to look for the forbidden gap combinations. If it works, it should be fast enough for primes up to at least 97 (well at least I hope so).

 mart_r 2022-05-19 17:28

It appears my VBA code for "forbidden gap combinations" (for getting a heuristic grip on the generalized maximal gap candidates) works as it should:
[CODE] 5: [ 2]
7: [ 2]
11: [ 2], [ 4]
13: [ 2], [ 2, 4]
17: [ 2], [ 4]
19: [ 2], [ 2, 4]
23: [ 2], [ 4]
29: [ 2], [ 4], [ 6]
31: [ 2], [ 2, 4], [ 2, 6], [ 2, 6, 4], [ 2, 4, 6]
37: [ 2], [ 4], [ 6], [ 2, 4, 8], [ 2, 4, 2, 10]
41: [ 2], [ 4], [ 2, 6], [ 4, 6], [ 2, 4, 6, 6], [ 4, 2, 4, 8], [ 2, 4, 2, 10]
43: [ 2], [ 2, 4], [ 2, 6, 4], [ 4, 2, 6], [ 2, 4, 6], [ 2, 4, 6, 2, 6], [ 2, 4, 2, 4, 8]
47: [ 2], [ 4], [ 4, 2, 4, 6], [ 4, 2, 4, 6, 2, 6], [ 4, 2, 4, 2, 4, 8]
53: [ 2], [ 4], [ 6], [ 2, 4, 2, 4, 8], [ 4, 2, 4, 2, 10], [ 2, 4, 2, 4, 6, 2, 10]
59: [ 2], [ 4], [ 6], [ 4, 8], [ 2, 10], [ 2, 4, 2, 4, 6, 8], [ 2, 4, 2, 4, 6, 2, 6, 10]
61: [ 2], [ 2, 4], [ 2, 6], [ 2, 6, 4], [ 2, 4, 6], [ 2, 6, 6], [ 2, 4, 8], [ 2, 6, 6, 4], [ 2, 6, 4, 6], [ 2, 4, 6, 6], [ 2, 4, 2, 10], [ 2, 4, 2, 4, 8, 6, 4], [ 2, 4, 2, 4, 6, 8, 4], [ 4, 2, 4, 2, 4, 8, 6], [ 2, 4, 2, 4, 6, 2, 10], [ 2, 4, 2, 4, 6, 2, 6, 6, 4, 6], [ 2, 4, 2, 4, 6, 2, 6, 4, 6, 6], [ 2, 4, 2, 4, 6, 2, 6, 4, 2, 10]
67: [ 2], [ 4], [ 6], [ 2, 4, 8], [ 2, 6, 4, 8], [ 2, 4, 6, 8], [ 2, 4, 2, 10], [ 2, 4, 2, 12], [ 2, 6, 4, 2, 10], [ 2, 4, 6, 2, 10], [ 2, 4, 2, 4, 6, 2, 6, 10], [ 2, 4, 2, 4, 6, 2, 6, 4, 2, 4, 12]
71: [ 2], [ 4], [ 2, 6], [ 4, 6], [ 2, 4, 6, 6], [ 4, 2, 4, 8], [ 2, 4, 2, 10], [ 4, 6, 2, 6, 6], [ 2, 6, 4, 6, 6], [ 4, 2, 4, 8, 6], [ 4, 6, 2, 4, 8], [ 4, 2, 6, 4, 8], [ 4, 2, 4, 6, 8], [ 2, 6, 4, 2, 10], [ 2, 4, 6, 2, 10], [ 4, 2, 4, 2, 12], [ 2, 4, 2, 4, 6, 2, 6, 6, 4, 6, 6], [ 2, 4, 2, 4, 6, 2, 6, 4, 6, 6, 6], [ 2, 4, 2, 4, 6, 2, 6, 4, 2, 10, 6], [ 2, 4, 2, 4, 6, 2, 6, 4, 2, 4, 12]
73: [ 2], [ 2, 4], [ 2, 6, 4], [ 4, 2, 6], [ 2, 4, 6], [ 2, 4, 6, 2, 6], [ 2, 4, 2, 4, 8], [ 2, 6, 4, 6, 2, 6], [ 2, 4, 6, 6, 2, 6], [ 2, 4, 2, 10, 2, 6], [ 2, 4, 6, 2, 6, 6], [ 2, 4, 2, 4, 8, 6], [ 2, 4, 2, 4, 6, 8], [ 2, 4, 6, 2, 6, 6, 4], [ 2, 4, 2, 4, 8, 6, 4], [ 2, 4, 2, 4, 6, 8, 4], [ 2, 6, 4, 2, 6, 4, 6], [ 2, 4, 6, 2, 6, 4, 6], [ 2, 6, 4, 2, 4, 6, 6], [ 2, 6, 4, 2, 4, 2, 10], [ 2, 4, 2, 4, 6, 2, 10], [ 2, 4, 2, 4, 6, 2, 6, 6, 4, 6], [ 2, 4, 2, 4, 6, 2, 6, 4, 6, 6], [ 2, 4, 2, 4, 6, 2, 6, 4, 2, 10], [ 2, 4, 2, 4, 6, 2, 6, 4, 2, 4, 6, 8]
79: [ 2], [ 4], [ 6], [ 4, 2, 4, 8], [ 2, 4, 2, 10], [ 2, 4, 2, 4, 6, 8], [ 2, 4, 6, 2, 6, 4, 8], [ 2, 6, 4, 2, 4, 6, 8], [ 2, 4, 2, 4, 6, 2, 10], [ 2, 6, 4, 2, 4, 2, 12], [ 2, 4, 2, 4, 6, 2, 12], [ 2, 4, 6, 2, 6, 4, 2, 10], [ 2, 4, 2, 4, 6, 2, 6, 10], [ 2, 4, 2, 4, 6, 2, 6, 4, 2, 4, 12], [ 2, 4, 2, 4, 6, 2, 6, 4, 2, 4, 6, 6, 8]
83: [ 2], [ 4], [ 2, 6], [ 4, 6], [ 4, 2, 4, 6, 6], [ 2, 4, 2, 4, 8], [ 4, 2, 4, 2, 10], [ 4, 2, 4, 6, 2, 6, 6], [ 4, 2, 4, 2, 4, 8, 6], [ 2, 4, 2, 4, 6, 2, 10], [ 4, 6, 2, 4, 6, 2, 6, 6], [ 4, 2, 4, 6, 6, 2, 6, 6], [ 2, 4, 6, 2, 6, 4, 6, 6], [ 4, 2, 4, 6, 2, 6, 6, 6], [ 2, 4, 2, 4, 6, 2, 10, 6], [ 4, 2, 4, 6, 2, 6, 4, 8], [ 2, 4, 6, 2, 6, 4, 2, 10], [ 2, 4, 2, 4, 6, 2, 6, 10], [ 2, 4, 2, 4, 6, 2, 6, 4, 2, 4, 6, 8]
89: [ 2], [ 4], [ 6], [ 2, 4, 8], [ 4, 2, 10], [ 2, 4, 2, 4, 6, 8], [ 4, 2, 4, 6, 2, 10], [ 4, 2, 4, 6, 2, 6, 4, 8], [ 2, 4, 2, 4, 6, 2, 6, 10], [ 4, 2, 4, 6, 6, 2, 6, 4, 8], [ 4, 2, 4, 2, 4, 8, 6, 4, 8], [ 4, 6, 2, 6, 4, 2, 4, 6, 8], [ 2, 4, 6, 2, 6, 4, 6, 2, 10], [ 2, 6, 4, 2, 4, 6, 6, 2, 10], [ 2, 6, 4, 2, 4, 2, 10, 2, 10], [ 2, 4, 2, 4, 6, 2, 10, 2, 10], [ 2, 4, 6, 2, 6, 4, 2, 6, 10], [ 2, 4, 2, 4, 6, 2, 6, 6, 10], [ 4, 6, 2, 6, 4, 2, 4, 2, 12], [ 2, 4, 6, 2, 6, 4, 2, 4, 12], [ 2, 4, 2, 4, 6, 2, 6, 4, 12], [ 2, 4, 2, 4, 6, 2, 6, 4, 2, 4, 6, 6, 8]
97: [ 2], [ 4], [ 6], [ 8], [ 2, 10], [ 2, 12], [ 2, 6, 10], [ 2, 4, 12], [ 2, 6, 6, 10], [ 2, 4, 8, 10], [ 2, 6, 4, 12], [ 4, 2, 6, 12], [ 2, 4, 6, 12], [ 4, 2, 4, 14], [ 2, 4, 2, 4, 8, 6, 10], [ 2, 4, 2, 4, 6, 8, 10], [ 4, 2, 4, 6, 2, 6, 12], [ 2, 4, 2, 4, 6, 2, 16], [ 2, 4, 2, 4, 6, 2, 6, 6, 4, 12], [ 2, 6, 4, 2, 4, 6, 6, 2, 6, 12], [ 2, 4, 2, 4, 6, 2, 6, 4, 6, 12], [ 2, 4, 2, 4, 6, 2, 10, 2, 4, 14], [ 2, 4, 2, 4, 6, 2, 6, 6, 4, 14], [ 2, 4, 6, 2, 6, 4, 2, 4, 6, 14], [ 2, 4, 2, 4, 6, 2, 6, 4, 6, 14], [ 2, 4, 2, 4, 6, 2, 6, 4, 2, 16], [ 2, 4, 2, 4, 6, 2, 6, 4, 2, 18], [ 2, 4, 6, 2, 6, 4, 2, 4, 6, 8, 10], [ 2, 4, 6, 2, 6, 4, 2, 4, 2, 12, 10], [ 2, 4, 6, 2, 6, 4, 2, 4, 6, 6, 12], [ 2, 4, 6, 2, 6, 4, 2, 4, 2, 10, 12]
[/CODE]
Computation time: less than a minute, but I believe it is possible to do it in less than a second with some really optimised code.

 Bobby Jacobs 2022-05-22 15:15

Very good! It seems like the popularity of a prime as the start of a maximal gap is based upon the gaps before p. However, there are weird exceptions like 29 and 37. The 2 gaps before 29 are (4, 6) and the gaps before 37 are (2, 6), but 29 is more popular than 37. If (2, 8) was an admissible gap combination, then that would be a forbidden gap combination for 29, but not 37. However, (2, 8) is not admissible.

By the way, I meant to use <= instead of >= in my previous post. The forbidden gap combinations are minimal admissible k-tuples <= the k gaps before p[SUB]m[/SUB]. How do I make the correct symbols for <= and >=?

 mart_r 2022-06-02 20:15

1 Attachment(s)
I have finally fully figured out how to tackle the behaviour of [$]o_n(x)[/$] - i.e. the number of occurrences of primes [$]p_n[/$] as initial members of maximal gaps between non-consecutive primes [$]p_n[/$] and [$]p_{n+k}[/$] for all [$]k<=x[/$].

Again, sincere thanks to Bobby for pushing me in the right direction. Although, "forbidden gap constellations" sounds kind of illegal, anyone mind if I call them "blocking patterns" or similar? Suggestions are welcome.

So, let [$]B(p_n)[/$] be the set of blocking patterns for the prime [$]p_n[/$], for example [$]B(31)=\lbrace\lbrace0,2\rbrace,\lbrace0,2,6\rbrace,\lbrace0,2,8\rbrace,\lbrace0,2,8,12\rbrace,\lbrace0,2,6,12\rbrace\rbrace[/$]. (Correspondingly, the blocking gap patterns are [$]\lbrace\lbrace2\rbrace,\lbrace2,4\rbrace,\lbrace2,6\rbrace,\lbrace2,6,4\rbrace,\lbrace2,4,6\rbrace\rbrace[/$].)

These patterns form a minimal set of sorts. I got temporarily addicted to try and find as many of them as possible. Much to my surprise, I recently even managed to get up to p=97 in less than a second even though my code is far from being optimised, but computation time is ballooning exponentially for larger p. The list in the attachment is not guaranteed to be exhaustive.

To evaluate [$]o_n(x)[/$] directly, we subtract from x the number of occurrences of all patterns in [$]B(p_n)[/$] in the range [[$]p_{n-k+2}[/$], [$]p_{n+x}[/$]], where k is the cardinality of the pattern.

By looking at the table of blocking patterns, we can now see right away, for example, that 29 occurs more often than 37 for large x by a margin equivalent to the number of occurrences of the patterns {0,2,6,14} and {0,2,6,8,18} below x. This answers post # 44.

[$]o_n(x)[/$] remains large if there are very few blocking patterns. [$]n=2[/$] has none because [$]B(p_n)=B(3)=\lbrace0,1\rbrace[/$], a non-admissible prime pattern for [$]p>=3[/$], hence [$]o_1(x)=o_2(x)=x[/$].
[$]n=3[/$] and [$]n=4[/$] only have [$]\lbrace0,2\rbrace[/$] as blocking patterns, all larger n have at least one pattern more, thus [$]o_4(x)>o_n(x)[/$] for all [$]n>4[/$] and [$]x>18[/$] (particularly, [$]o_4(x)=x+2-\#(twin\:primes\:below\:p_{4+x})[/$]).
There's [$]n=8[/$] with [$]B(19)=\lbrace\lbrace0,2\rbrace,\lbrace0,2,6\rbrace\rbrace[/$], a minimum for its kind, only twins and the first kind of triplets are blocked, and all [$]n>8[/$] have at least one more blocking pattern, or one that is more common, like [$]\lbrace0,6\rbrace[/$]. We have [$]o_8(x)>o_n(x)[/$] for all [$]n>8[/$] and [$]x>496[/$] (i.e. p=19 "cannot be beaten" above that point).

The asymptotic growth rate of [$]o_n(x)[/$] can be obtained via the blocking patterns with additional regard to the open residue classes in each pattern. For x large, [$]o_{29}(x)[/$] ([$]p_{29}=109[/$]) differs from [$]o_8(x)[/$] only by a margin of the number of occurrences of sextuples [$]\lbrace0,2,8,12,14,20\rbrace[/$], [$]\lbrace0,2,6,12,14,20\rbrace[/$], [$]\lbrace0,2,6,8,12,18\rbrace[/$], and [$]\lbrace0,2,6,8,12,20\rbrace[/$] with a total of 8 open residue classes mod 210; in terms of error this is [$]O(x\cdot(\log x)^{-6})[/$]. We can leave septuples or longer patterns out of the game as the have [$]O(x\cdot(\log x)^{-7})[/$] or smaller. If p=109 should be beaten in the long run, it requires, apart from the minimum of [$]\lbrace0,2\rbrace[/$] and [$]\lbrace0,2,6\rbrace[/$] as blocking patterns, either sextuples with less open residue classes in total, or no sextuples at all. And of course, no quadruple or quintuple blocking pattern as well. The next candidate for this is p=5659: only [$]\lbrace0,2,6,8,12,18\rbrace[/$] gets blocked, and this pattern has only one open residue class mod 210.

Regarding p=5659 vs. p=9439 (my fallacy in post # 40), the latter seems to be in the lead judging by the small numbers because of the millions of possible blocking patterns in favor of p=9439, but these have a cardinality of as small as 5. At [$]x=10^6[/$], p=9439 is in the lead by more than 30,000 - it takes at least as many quintuples of the forms [$]\lbrace0,4,6,12,16\rbrace[/$], [$]\lbrace0,4,6,10,16\rbrace[/$], [$]\lbrace0,6,8,14,18\rbrace[/$], [$]\lbrace0,2,8,14,18\rbrace[/$], [$]\lbrace0,6,10,12,18\rbrace[/$], [$]\lbrace0,4,10,12,18\rbrace[/$], [$]\lbrace0,6,8,12,18\rbrace[/$], [$]\lbrace0,2,8,12,18\rbrace[/$], [$]\lbrace0,2,6,12,18\rbrace[/$], [$]\lbrace0,4,6,10,18\rbrace[/$], or [$]\lbrace0,2,6,8,18\rbrace[/$] until p=5659 can overtake p=9439, we expect this not to happen before [$]x=10^8[/$].

To conclude, the primes for which a local maximum as described in post # 35 is reached for [$]\lim x\to\infty[/$], or rather, for sufficiently large x, should be equal to [$]2\:(3), 7,[/$] and [$]19[/$], with infinitely many [$]o_n(x)[/$] for [$]n>8[/$] coming arbitrarily close to [$]o_8(x)-O(x\cdot(\log x)^{-6})[/$] (e.g. the primes [$]5659[/$] ([$]n=746[/$]), [$]88819[/$] ([$]n=8605[/$]), [$]855739[/$] ([$]n=68032[/$]), [$]74266279[/$] ([$]n=4353833[/$]), [$]964669639[/$] ([$]n=49141276[/$]), [$]9853497769[/$] ([$]n=448687813[/$]), etc. each move toward this upper bound from below). So my previous implicit assumption that the list of primes with local maxima, bounded from above, is infinite was wrong.

Phew, that took long enough. And it's only framework, sort of. Also poorly worded at times, but I really need to finish this off now, one way or another.
I flip out if now someone gives me a link to some obscure 19th century work that covers all this...

 mart_r 2022-06-09 17:26

"Sitting target / sitting, waiting / anticipating / nothing / nothing."

CSG looks well-behaved even for k <= 1024 (p in range < 10^14):

[CODE] k gap CSG_max p
112 5940 1.05550107 36683716323847
116 6052 1.02516052 36683716323619
120 6220 1.03269957 36683716323283
124 6388 1.04043735 36683716323283
128 6510 1.01858817 36683716323161
132 6642 1.00390061 36683716323167
136 6742 0.96976743 36683716323109
140 6658 0.94384648 17674627574311
144 6840 0.96488178 17674627574369
148 6992 0.96688912 17674627574141
152 7126 0.95779790 17674627574083
156 7460 0.97452838 30512335335437
160 7614 0.97643675 30512335335437
164 7732 0.95708911 30512335335319
168 7946 0.99499058 30512335334951
172 8100 0.99726110 30512335334797
176 8254 0.99967015 30512335334797
180 8364 0.97661645 30512335335299
184 8510 0.97483498 30512335335059
188 8736 1.01921576 30512335334927
192 8892 1.02319197 30512335334771
196 9004 1.00215904 30512335334797
200 9148 1.01448166 28330683392731
204 9324 1.03039259 28330683392659
208 9492 1.04177291 28330683392597
212 9630 1.03626675 28330683392353
216 9778 1.03654152 28330683392371
220 9856 0.99828866 28330683392371
224 9974 0.98269325 28330683392147
228 10058 0.94929275 28330683392129
232 8294 0.94835143 185067241757
236 9700 0.95641246 5185992136441
240 9850 0.96394780 5185992136453
244 10626 0.94205155 28330683392597
248 10818 0.96644566 28330683392371
252 10596 0.94771341 12666866223047
256 11310 0.93908073 52248744686339
260 11476 0.94818065 52248744686197
264 11604 0.93866201 52248744686069
268 11724 0.92547977 52248744686197
272 11264 0.93001522 12666866223047
276 12106 0.91167574 68182243872601
280 11752 0.91251084 21947823205027
284 11920 0.92535164 21947823205027
288 12096 0.94216306 21947823204943
292 12310 0.94178965 25698372297889
296 12460 0.94533825 25698372297691
300 12704 0.99505355 25698372297029
304 12920 1.03124573 25698372297029
308 13170 1.08475215 25698372297029
312 13308 1.08194976 25698372297029
316 13482 1.09729159 25698372297029
320 13616 1.09257083 25698372296963
324 13728 1.07704353 25698372296873
328 13878 1.08048911 25698372297029
332 13986 1.06336781 25698372297007
336 14136 1.06693878 25698372296963
340 14234 1.04538481 25698372296873
344 14336 1.02612587 25698372296243
348 14466 1.02043217 25698372295733
352 14642 1.03657564 25698372297029
356 14778 1.03379163 25698372295733
360 14890 1.01983645 25698372295711
364 15044 1.02563857 25698372296963
368 15222 1.04265118 25698372295019
372 15360 1.04099593 25698372294839
376 15546 1.06172759 25698372295033
380 15694 1.06474083 25698372294457
384 15832 1.06313720 25698372294409
388 15968 1.06066576 25698372294611
392 16158 1.08316800 25698372294421
396 16242 1.05682221 25698372294337
400 16344 1.03908815 25698372294563
404 16536 1.06228245 25698372294457
408 16678 1.06277691 25698372294421
412 16762 1.03722225 25698372294337
416 16852 1.01477000 25698372294457
420 16974 1.00672310 25698372295033
424 17160 1.02688378 25698372294421
428 17302 1.02766540 25698372294421
432 17396 1.00751345 25698372294611
436 17586 1.02931311 25698372294421
440 17724 1.02843581 25698372294409
444 17810 1.00513477 25698372294323
448 17886 0.97797632 25698372294253
452 17972 0.95549900 25698372294281
456 18114 0.95669262 25698372293557
460 18234 0.94875594 25698372293809
464 18390 0.95581939 25698372293597
468 18536 0.95873888 25698372293597
472 19506 0.94029942 93152147737543
476 19770 0.98628553 93152147737279
480 19878 0.97192308 93152147737199
484 19954 0.94554667 93152147737237
488 19192 0.94334862 25698372294421
492 20322 0.97552201 93152147736727
496 20490 0.98440496 93152147736559
500 20598 0.97040570 93152147736451
504 20748 0.97245252 93152147736301
508 20850 0.95643446 93152147736199
512 21004 0.96004428 93152147736073
516 21260 1.00210684 93152147735789
520 21390 0.99658464 93152147735659
524 21478 0.97538922 93152147735599
528 21592 0.96413821 93152147735371
532 21726 0.96039757 93152147735351
536 21874 0.96185682 93152147735203
540 21964 0.94210589 93152147735113
544 22076 0.93058797 93152147734973
548 22224 0.93216222 93152147733739
552 22486 0.97513465 93152147732647
556 22628 0.97445048 93152147734421
560 22792 0.98180763 93152147734171
564 22958 0.98989507 93152147734091
568 23130 1.00017583 93152147733919
572 23346 1.02661845 93152147733703
576 23524 1.03914014 93152147733553
580 23610 1.01786364 93152147733467
584 23706 1.00050490 93152147733553
588 23912 1.02309904 93152147733137
592 24068 1.02754489 93152147732981
596 24240 1.03781136 93152147732723
598 24402 1.07077256 93152147732647
600 24436 1.05684370 93152147732641
604 24540 1.04234724 93152147732509
608 24676 1.03956218 93152147732401
612 24798 1.03177448 93152147732251
616 24880 1.00980556 93152147732197
620 25008 1.00437652 93152147732069
624 25164 1.00888491 93152147731913
628 25264 0.99368357 93152147731813
632 25348 0.97310855 93152147731729
636 25500 0.97626664 93152147731549
640 25578 0.95395507 93152147731499
644 25696 0.94554893 93152147731381
648 25860 0.95284382 93152147731217
652 26004 0.95333346 93152147731073
656 26252 0.98935642 93152147730797
660 26412 0.99528904 93152147730637
664 26606 1.01294463 93152147730443
668 26706 0.99822651 93152147730371
672 26826 0.99048613 93152147730223
676 26938 0.98010919 93152147730139
680 27094 0.98468729 93152147729983
684 27186 0.96770698 93152147729891
688 27276 0.95027202 93152147729983
692 27368 0.93371537 93152147729891
696 27516 0.93569220 93152147729561
700 27582 0.91092486 93152147729467
704 27698 0.90261024 93152147729561
708 27820 0.89629956 93152147729143
712 27948 0.89196235 93152147729143
716 28048 0.87877867 93152147729143
720 27710 0.89275685 54116590394771
724 27860 0.89636501 54116590394621
728 27998 0.89606095 54116590394483
732 28172 0.90750139 54116590393157
736 28332 0.91437757 54116590394149
740 28536 0.93570243 54116590393991
744 28666 0.93272540 54116590393861
748 28800 0.93108486 54116590393777
752 28982 0.94518150 54116590393499
756 29130 0.94812537 54116590393447
760 29370 0.98143984 54116590393157
764 29456 0.96387023 54116590393121
768 29630 0.97537452 54116590392947
772 29706 0.95469068 54116590393157
776 29826 0.94853391 54116590392947
780 29964 0.94825668 54116590392929
784 30076 0.93959664 54116590392451
788 30192 0.93229670 54116590392947
792 30288 0.91869099 54116590392289
796 30456 0.92805971 54116590392121
800 30654 0.94703768 54116590391873
804 30740 0.93024784 54116590391837
808 30816 0.91051339 54116590391861
812 30990 0.92171618 54116590391873
816 31176 0.93673527 54116590391351
820 31368 0.95371131 54116590391113
824 31516 0.95671400 54116590391011
828 31596 0.93820121 54116590391011
832 31734 0.93807554 54116590391113
836 31852 0.93169439 54116590391011
840 31936 0.91480473 54116590391077
844 32062 0.91104489 54116590391077
848 32158 0.89810577 54116590391011
852 32880 0.89162466 93152147732647
856 33006 0.88736277 93152147732641
860 32594 0.90483328 54116590389887
864 32714 0.89936117 54116590389863
868 32790 0.88065023 54116590389887
872 32960 0.89035364 54116590389887
876 33068 0.88139835 54116590389473
880 33158 0.86716391 54116590389419
884 33276 0.86135519 54116590389863
888 33420 0.86326354 54116590389473
892 33550 0.86104325 54116590388977
896 33738 0.87595633 54116590388789
900 34052 0.86261430 65480290959731
904 34264 0.88413463 65480290959547
908 34380 0.87757423 65480290959403
912 34474 0.86468039 65480290959403
916 35030 0.86491644 93152147730443
920 35156 0.86099754 93152147730497
924 34932 0.87719975 65480290958651
928 35160 0.90333082 65480290958651
932 35254 0.89038566 65480290958557
936 35504 0.89448345 70981263873617
940 35646 0.89544859 70981263873617
944 35654 0.88610601 65480290958129
948 35814 0.89239499 65480290957997
952 36080 0.90067205 70981263873617
956 36204 0.89647169 70981263873617
960 36294 0.88259124 70981263872969
964 32722 0.87857798 3529553758999
968 36550 0.87667128 70981263873109
972 36728 0.88790229 70981263872969
976 36864 0.88721696 70981263872257
980 37006 0.88823910 70981263872257
984 37086 0.87179868 70981263872257
988 37224 0.87172780 70981263872257
992 37440 0.89358331 70981263872257
996 37564 0.88954266 70981263872257
1000 36346 0.87913969 25264345114117
1004 36534 0.89520659 25264345113919
1008 36604 0.87646499 25264345113919
1012 36740 0.87719292 25264345113713
1016 36876 0.87792446 25264345113613
1020 37294 0.87603752 31618998499597
1024 37074 0.85792826 25264345113613
[/CODE]
Update on blocking patterns (see previous post):
p = 157: 1195 patterns on my watch
p = 163: at least 2125 patterns
p = 167: at least 4000 patterns
p = 173: at least 5733 patterns
p = 179: at least 7357 patterns
p = 181: at least 16345 patterns
p = 191: at least 11710 patterns
But the number of patterns is not terribly important (and probably impossible to compute in full for p > 179 or 181) - for some decent comparisons between values of o[SUB]n[/SUB](x), it should be sufficient to know the patterns with cardinality <= 7 or 8 or thereabouts, these are not too hard to figure out if p is not too large.

This is getting boring, I'm going to watch some episodes of PJ Masks now.:popcorn:

 Bobby Jacobs 2022-06-12 18:13

[QUOTE=Bobby Jacobs;604770]What is the pattern with the sequence of primes with record low numbers of occurrences? It seems like the sequence is 2, 5, 11, 29, 37, 59, 97, 127, 223, 307, 541, 907, 1151, 1361, ... This is similar to the primes at the end of maximal prime gaps, but not exactly. I wonder what the pattern is.[/QUOTE]

I believe that 223 will eventually beat 127. It starts out behind because there are two consecutive gaps of 12 before 223. However, 223 will eventually catch up with 127 because 127 has a gap of 14. Therefore, the sequence of record lows will start 2, 5, 11, 29, 37, 59, 97, 127, 307, 541, 907, 1151, 1361, ...

 mart_r 2022-06-13 18:00

[QUOTE=Bobby Jacobs;607677]I believe that 223 will eventually beat 127. It starts out behind because there are two consecutive gaps of 12 before 223. However, 223 will eventually catch up with 127 because 127 has a gap of 14. Therefore, the sequence of record lows will start 2, 5, 11, 29, 37, 59, 97, 127, 307, 541, 907, 1151, 1361, ...[/QUOTE]

That's what I would assume as well. These would be the primes at the end of a maximal gap, including ones where there is a tie to the previous maximal gap, if the blocking patterns cover more common patterns.

My search is still running, slowly approaching 2e14 for k <= 109.
Does anyone think CSG > 1.1 is possible to find?

 mart_r 2022-07-14 20:22

Don't answer me, don't break the silence, don't let me win

1 Attachment(s)
Attached are the numbers of first occurrence gaps for k <= 109 and p <= 2e14.
Don't look for me, I'm already moving on.:digging:

 mart_r 2022-08-01 18:44

Error terms, prime number scarcities, and trains

Just an intermediate result that made me go "hmmmm...". Suppose we assume [$]CSG=1+O(1)[/$] for the gaps between non-consecutive primes, then, if I did the math right, this would imply that we also assume [$]\pi(x)=Li(x)+O(\sqrt{x})[/$], i.e. the error term is smaller by a factor log x compared to the RH prediction. Correct [y/n]?

[CODE]Outline from my train of thought:
p_1 = 2 (or set p_0 = 0, say)
p_k = x
k = pi(x)-1 ~ pi(x)
gap = x-2 ~ x
m = Gram(x)-Gram(2)-k+1 ~ Gram(x)-pi(x)
CSG = m*|m|/gap - but for simplicity suppose that m is positive (means we assume a scarcity instead of an abundance of primes; the error term works both ways anyway):
CSG = m^2/gap ~ (Gram(x)-pi(x))^2/x

CSG ~ 1 --> (Gram(x)-pi(x))^2 ~ x --> Gram(x)-pi(x) ~ sqrt(x)

OTOH, if Gram(x)-pi(x) = O(sqrt(x)*log(x)),
then CSG = m^2/gap ~ O((x*log²x)/x) ~ O(log²x)[/CODE]

 Bobby Jacobs 2022-08-07 19:05

That is correct. By the way, you should submit the sequences in this thread to OEIS.

 mart_r 2022-08-24 17:03

1 Attachment(s)
[QUOTE=mart_r;596734]
As a by-product, a puzzle:
Given x, find the next three consecutive primes >= x. Denote the two gaps between them g[SUB]1[/SUB] and g[SUB]2[/SUB], and let g[SUB]1[/SUB] >= g[SUB]2[/SUB]. Let r = g[SUB]1[/SUB]/g[SUB]2[/SUB].
As x becomes larger, the geometric mean r[SUB]gm[/SUB] of values of r also become larger. Find an asymptotic function f(x) ~ r[SUB]gm[/SUB].[/QUOTE]

[$]\lim\limits_{\substack{x\to\infty}} r_{gm} = 4[/$], if I may so conjecture (based on a random model similar to Cramér's). Is there a proof available?

I'd like to take the search for T(38,16) in A[OEIS]086153[/OEIS] up to 10^16, which will likely not be enough to find an example, but I still would like to see that case solved. It would take a bit more than a week with my program. I've identified 746 distinct constellations as shown in the attachment. I believe that list to be complete, albeit I'd be more content if that number was divisible by 4, so there's a slight possibility I have overlooked some constellations. If anyone with enough time on their hands feels inclined to do a quick double-check...

For good measure, here's a batch of 79 instances where CSG > 1 for k > 1000:

[CODE]p k gap CSG
123146152018999 1152 44280 1.0322718
123146152018933 1154 44346 1.0310658
123146152018999 1127 43378 1.0263032
123146152018999 1126 43342 1.0260889
123146152018933 1129 43444 1.0250767
123146152018933 1156 44394 1.0249425
123146152018933 1128 43408 1.0248616
123146152018921 1155 44358 1.0247205
123146152018999 1157 44428 1.0246186
123146152018999 1133 43582 1.0242866
123146152018993 1153 44286 1.0242773
123146152018999 1138 43758 1.0242719
123146152018933 1159 44494 1.0234272
123146152018933 1135 43648 1.0230694
123146152018933 1140 43824 1.0230603
123146152018823 1158 44456 1.0226588
123146152019071 1151 44208 1.0221944
123146152018999 1125 43288 1.0209057
123146152018999 1139 43780 1.0206462
123146152018933 1141 43846 1.0194401
123146152018933 1160 44514 1.0192932
123146152018933 1130 43458 1.0192328
123146152019521 1113 42856 1.0183353
123146152019521 1112 42820 1.0181224
123146152018853 1132 43524 1.0180185
123146152018853 1131 43488 1.0178006
123146152018999 1094 42184 1.0176670
123146152018999 1091 42078 1.0176016
123146152018921 1136 43660 1.0166975
123146152019521 1143 43906 1.0165963
123146152018853 1162 44574 1.0164815
123146152018933 1096 42250 1.0164132
123146152018933 1093 42144 1.0163444
123146152019521 1119 43060 1.0163041
123146152019521 1124 43236 1.0162807
123146152018993 1134 43588 1.0162592
123146152018999 1095 42210 1.0150911
123146152018823 1163 44604 1.0150789
123146152018823 1144 43934 1.0146314
123146152019071 1137 43686 1.0141775
123146152018933 1097 42276 1.0138418
123146152019419 1142 43860 1.0136414
123146152018823 1161 44528 1.0135410
123146152019521 1111 42766 1.0129308
123146152019507 1114 42870 1.0124697
123146152018801 1164 44626 1.0115109
123146152019521 1116 42936 1.0112458
123146152018801 1145 43956 1.0110334
123146152019507 1120 43074 1.0104594
123146152019521 1080 41662 1.0097438
123146152019521 1077 41556 1.0096842
123146152018993 1092 42084 1.0094570
123146152019483 1115 42894 1.0093765
123146152018853 1099 42330 1.0092682
123146152018999 1088 41938 1.0080624
123146152018823 1100 42360 1.0078183
123146152019419 1117 42958 1.0076073
123146152018801 1146 43978 1.0074438
123146152018801 1165 44646 1.0074105
123146152018921 1098 42288 1.0073935
123146152019483 1121 43098 1.0073785
123146152019071 1090 42006 1.0073695
123146152019521 1081 41688 1.0071605
123146152019521 1079 41616 1.0067457
123146152019419 1147 44008 1.0060364
123146152019167 1150 44112 1.0056258
123146152019419 1123 43162 1.0056203
123146152018823 1101 42386 1.0052645
123146152019207 1149 44072 1.0043139
123146152018999 1089 41958 1.0038262
123146152019461 1122 43120 1.0037558
123146152019507 1078 41570 1.0037494
123146152019521 1118 42976 1.0028794
123146152018583 1167 44696 1.0019334
123146152019419 1148 44028 1.0019166
123146152018801 1102 42408 1.0016116
123146152019507 1082 41702 1.0012434
123146152019521 1074 41416 1.0001307
123146152018793 1166 44654 1.0000862
[/CODE]

 mart_r 2022-09-02 18:14

Dancing with tears in my eyes...

[QUOTE=mart_r;612010][$]\lim\limits_{\substack{x\to\infty}} r_{gm} = 4[/$], if I may so conjecture (based on a random model similar to Cramér's). Is there a proof available?
[/QUOTE]

Is this not a well-known result? If so, I might try to tackle the proof myself...

They say that the gas pipeline Nord Stream 1 is kept shut indefinitely. So before power outrages become daily routine, I'd like to give an update on some numbers.

- Gaps between non-consecutive primes, for k=104 to 1024 step 4:
[CODE]p <= 179133400000000
k gap CSG_max p
104 5656 1.0781126752 36683716323847
108 5824 1.0843154811 36683716323847
112 5940 1.0555010733 36683716323847
116 6052 1.0251605182 36683716323619
120 6220 1.0326995729 36683716323283
124 6388 1.0404373460 36683716323283
128 6510 1.0185881717 36683716323161
132 6642 1.0039006107 36683716323167
136 6742 0.9697674279 36683716323109
140 7292 0.9521920888 175478559288359
144 6840 0.9648817776 17674627574369
148 6992 0.9668891162 17674627574141
152 7126 0.9577979013 17674627574083
156 7460 0.9745283792 30512335335437
160 8144 0.9792679542 175478559288359
164 7732 0.9570891069 30512335335319
168 7946 0.9949905766 30512335334951
172 8100 0.9972610993 30512335334797
176 8254 0.9996701497 30512335334797
180 8364 0.9766164520 30512335335299
184 8510 0.9748349809 30512335335059
188 8736 1.0192157620 30512335334927
192 8892 1.0231919672 30512335334771
196 9004 1.0021590389 30512335334797
200 9148 1.0144816568 28330683392731
204 9324 1.0303925866 28330683392659
208 9492 1.0417729138 28330683392597
212 9630 1.0362667509 28330683392353
216 9778 1.0365415158 28330683392371
220 9856 0.9982886575 28330683392371
224 9974 0.9826932475 28330683392147
228 10058 0.9492927463 28330683392129
232 8294 0.9483514306 185067241757
236 9700 0.9564124562 5185992136441
240 9850 0.9639477964 5185992136453
244 10626 0.9420515461 28330683392597
248 10818 0.9664456553 28330683392371
252 10596 0.9477134052 12666866223047
256 11310 0.9390807333 52248744686339
260 11476 0.9481806463 52248744686197
264 11604 0.9386620116 52248744686069
268 11724 0.9254797708 52248744686197
272 11264 0.9300152206 12666866223047
276 12106 0.9116757369 68182243872601
280 11752 0.9125108382 21947823205027
284 11920 0.9253516441 21947823205027
288 12096 0.9421630582 21947823204943
292 12310 0.9417896525 25698372297889
296 12460 0.9453382500 25698372297691
300 12704 0.9950535482 25698372297029
304 12920 1.0312457318 25698372297029
308 13170 1.0847521505 25698372297029
312 13308 1.0819497629 25698372297029
316 13482 1.0972915901 25698372297029
320 13616 1.0925708301 25698372296963
324 13728 1.0770435304 25698372296873
328 13878 1.0804891085 25698372297029
332 13986 1.0633678090 25698372297007
336 14136 1.0669387810 25698372296963
340 14234 1.0453848066 25698372296873
344 15204 1.0287670437 127946496635897
348 15390 1.0445817969 127946496635761
352 15540 1.0446056952 127946496635611
356 15692 1.0455495832 127946496635459
360 15798 1.0266221073 127946496635459
364 15044 1.0256385680 25698372296963
368 15222 1.0426511752 25698372295019
372 15360 1.0409959251 25698372294839
376 15546 1.0617275885 25698372295033
380 15694 1.0647408322 25698372294457
384 15832 1.0631372016 25698372294409
388 15968 1.0606657649 25698372294611
392 16158 1.0831680032 25698372294421
396 16242 1.0568222056 25698372294337
400 16344 1.0390881483 25698372294563
404 16536 1.0622824463 25698372294457
408 16678 1.0627769150 25698372294421
412 16762 1.0372222537 25698372294337
416 16852 1.0147699971 25698372294457
420 16974 1.0067230990 25698372295033
424 17160 1.0268837758 25698372294421
428 17302 1.0276653950 25698372294421
432 17396 1.0075134540 25698372294611
436 17586 1.0293131103 25698372294421
440 17724 1.0284358125 25698372294409
444 17810 1.0051347652 25698372294323
448 17886 0.9779763169 25698372294253
452 17972 0.9554989984 25698372294281
456 18114 0.9566926179 25698372293557
460 18234 0.9487559428 25698372293809
464 18390 0.9558193895 25698372293597
468 18536 0.9587388800 25698372293597
472 19656 0.9486426201 112364701413971
476 19770 0.9862855261 93152147737279
480 19878 0.9719230760 93152147737199
484 19954 0.9455466698 93152147737237
488 19192 0.9433486203 25698372294421
492 20322 0.9755220092 93152147736727
496 20490 0.9844049639 93152147736559
500 20598 0.9704056982 93152147736451
504 20748 0.9724525235 93152147736301
508 20850 0.9564344564 93152147736199
512 21004 0.9600442813 93152147736073
516 21260 1.0021068423 93152147735789
520 21390 0.9965846355 93152147735659
524 21478 0.9753892159 93152147735599
528 21592 0.9641382100 93152147735371
532 21726 0.9603975747 93152147735351
536 21874 0.9618568153 93152147735203
540 21964 0.9421058879 93152147735113
544 22076 0.9305879709 93152147734973
548 22224 0.9321622171 93152147733739
552 22486 0.9751346521 93152147732647
556 22628 0.9744504782 93152147734421
560 22792 0.9818076325 93152147734171
564 22958 0.9898950736 93152147734091
568 23130 1.0001758329 93152147733919
572 23346 1.0266184470 93152147733703
576 23524 1.0391401441 93152147733553
580 23610 1.0178636352 93152147733467
584 23706 1.0005048976 93152147733553
588 23912 1.0230990399 93152147733137
592 24068 1.0275448938 93152147732981
596 24240 1.0378113630 93152147732723
600 24436 1.0568436976 93152147732641
604 24540 1.0423472371 93152147732509
608 24676 1.0395621760 93152147732401
612 24798 1.0317744784 93152147732251
616 24880 1.0098055650 93152147732197
620 25008 1.0043765193 93152147732069
624 25164 1.0088849117 93152147731913
628 25264 0.9936835657 93152147731813
632 25348 0.9731085473 93152147731729
636 25500 0.9762666351 93152147731549
640 25578 0.9539550727 93152147731499
644 25696 0.9455489291 93152147731381
648 25860 0.9528438164 93152147731217
652 26004 0.9533334554 93152147731073
656 26252 0.9893564159 93152147730797
660 26412 0.9952890412 93152147730637
664 26606 1.0129446324 93152147730443
668 26706 0.9982265121 93152147730371
672 26826 0.9904861287 93152147730223
676 26938 0.9801091903 93152147730139
680 27094 0.9846872883 93152147729983
684 27186 0.9677069785 93152147729891
688 27276 0.9502720219 93152147729983
692 27368 0.9337153701 93152147729891
696 27516 0.9356922025 93152147729561
700 27582 0.9109248623 93152147729467
704 27698 0.9026102400 93152147729561
708 27820 0.8962995612 93152147729143
712 27948 0.8919623539 93152147729143
716 28048 0.8787786737 93152147729143
720 27710 0.8927568473 54116590394771
724 27860 0.8963650091 54116590394621
728 27998 0.8960609520 54116590394483
732 28172 0.9075013936 54116590393157
736 28332 0.9143775739 54116590394149
740 28536 0.9357024342 54116590393991
744 28666 0.9327253951 54116590393861
748 28800 0.9310848576 54116590393777
752 28982 0.9451815024 54116590393499
756 29130 0.9481253683 54116590393447
760 29370 0.9814398420 54116590393157
764 29456 0.9638702316 54116590393121
768 29630 0.9753745155 54116590392947
772 29706 0.9546906758 54116590393157
776 29826 0.9485339103 54116590392947
780 29964 0.9482566835 54116590392929
784 30076 0.9395966369 54116590392451
788 30192 0.9322967009 54116590392947
792 30288 0.9186909882 54116590392289
796 30456 0.9280597127 54116590392121
800 30654 0.9470376796 54116590391873
804 30740 0.9302478398 54116590391837
808 31974 0.9117548600 159316577936029
812 30990 0.9217161811 54116590391873
816 31176 0.9367352659 54116590391351
820 32550 0.9554814455 159316577935453
824 31516 0.9567140006 54116590391011
828 31596 0.9382012070 54116590391011
832 31734 0.9380755356 54116590391113
836 31852 0.9316943869 54116590391011
840 31936 0.9148047257 54116590391077
844 32062 0.9110448935 54116590391077
848 32158 0.8981057702 54116590391011
852 32880 0.8916246643 93152147732647
856 33006 0.8873627713 93152147732641
860 32594 0.9048332804 54116590389887
864 32714 0.8993611673 54116590389863
868 34120 0.9116132357 159316577935453
872 34218 0.8986902090 159316577935453
876 34398 0.9093907279 159316577935453
880 34498 0.8971206895 159316577935453
884 34592 0.8832711645 159316577933411
888 34758 0.8899100180 159316577935453
892 34934 0.8993959518 159316577936297
896 35074 0.8986493801 159316577936233
900 35262 0.9115556093 159316577935969
904 35406 0.9119383256 159316577935453
908 35630 0.9351767250 159316577935601
912 35784 0.9384016321 159316577935453
916 35880 0.9250502187 159316577935453
920 36024 0.9254373323 159316577935433
924 36102 0.9071761352 159316577935601
928 36288 0.9194386246 159316577935453
932 36460 0.9277658577 159316577935453
936 36576 0.9202752667 159316577935601
940 36744 0.9274602593 159316577935453
944 36906 0.9329559987 159316577935453
948 37068 0.9384527900 159316577935453
952 37140 0.9186590345 159316577935453
956 37282 0.9185545605 159316577935969
960 37384 0.9073477992 159316577935969
964 37650 0.9418370777 159316577935601
968 37800 0.9439561470 159316577935451
972 37914 0.9360034504 159316577935423
976 38014 0.9242274696 159316577935969
980 37812 0.9276107833 120293264372867
984 38382 0.9474156903 159316577935601
988 38538 0.9512197726 159316577935453
992 38680 0.9511189880 159316577935453
996 38796 0.9438031196 159316577935453
1000 38866 0.9238826098 159316577935453
1004 39040 0.9326313213 159316577935453
1008 39126 0.9172648307 159316577935453
1012 39348 0.9391390323 159316577935601
1016 39538 0.9523097203 159316577935453
1020 39680 0.9522520689 159316577935601
1024 39856 0.9615749322 159316577935453
[/CODE]

- Gaps between primes in arithmetic progression, for q=4568 to 5004 step 2:
[CODE]p <= 23388300000000
q gap CSG (conv.) p
4568 1548552 0.8572222356 1677084447851
4570 1183630 0.8390238160 1196563621633
4572 676656 0.9313083686 3312086153
4574 864486 0.8348603294 1749438037
4576 617760 0.8078001685 464384941
4578 691278 0.8429669902 84048460189
4580 1108360 0.8026462441 890252180611
4582 1383764 0.8499365180 720395477939
4584 1141416 0.7964331851 21652890442697
4586 1371214 0.8127600152 606453831427
4588 1601212 0.8876812908 3550398242161
4590 867510 0.8724168546 5747636061659
4592 1428112 0.8464431695 7482931558789
4594 1745720 0.8491640934 9894775021751
4596 896220 0.8192055813 417572047247
4598 1549526 0.8296428911 21799960507001
4600 1283400 0.7977381722 13502858057147
4602 1090674 0.8445938334 16897337246939
4604 1749520 0.8362905821 12528155746207
4606 428358 0.8045087092 15779549
4608 926208 0.8881770694 207016317479
4610 1212430 0.8526133843 1183984521847
4612 894728 0.9475156489 618769103
4614 461400 0.8323251172 177577073
4616 1583288 0.8432163277 2500655788181
4618 1454670 0.8260526488 991355520937
4620 328020 0.8965801195 300426827
4622 1687030 0.8202913337 9089241698347
4624 550256 0.8642679215 26284901
4626 1050102 0.8210523101 3403774701511
4628 1596660 0.8144418081 17046531702059
4630 1361220 0.7957535391 16338258362707
4632 291816 0.8541090988 2708653
4634 1181670 0.8315601474 431161340839
4636 1070916 0.7908290917 74835258193
4638 834840 0.8481347282 92370239231
4640 389760 0.8488446783 8560609
4642 1425094 0.8402156795 2200086910369
4644 1114560 0.8332081592 8272678130681
4646 1681852 0.8229584664 17244249871939
4648 957488 0.8394410220 28539747311
4650 916050 0.8669161631 7715831183377
4652 907140 0.8022040760 3800111563
4654 837720 0.9111719565 1022854519
4656 1164000 0.8197000840 16031665116419
4658 1481244 0.7793115567 6846908799389
4660 1337420 0.8169553941 7910942491217
4662 731934 0.7990676643 351440070953
4664 1455168 0.7900947961 8378888283431
4666 1843070 0.8398134556 21034084207667
4668 606840 0.7997013450 4009021879
4670 448320 0.8325428315 23630069
4672 1191360 0.8690884709 39202962193
4674 1051650 0.8288516679 7787632946129
4676 827652 0.8363384979 4784767627
4678 1468892 0.8470457965 672647311367
4680 336960 0.8186005024 161618917
4682 435426 0.8382468056 2520173
4684 1311520 0.7852421447 400661984803
4686 1077780 0.8318802396 16277427487337
4688 1392336 0.8603480773 269749617047
4690 1069320 0.8882226297 939523507907
4692 1102620 0.8986838410 6608920918927
4694 1825966 0.9167594012 4511534178661
4696 723184 0.8224917628 257098579
4698 361746 0.8481017107 19332767
4700 1207900 0.8281666227 1687877098657
4702 893380 0.8660946502 1254661021
4704 940800 0.7810442832 10036010128121
4706 1369446 0.8135118655 1330625650261
4708 630872 0.8454641507 139903367
4710 527520 0.8361774196 5812980889
4712 1526688 0.8205824387 5570936685233
4714 900374 0.8147104625 2546122913
4716 429156 0.7783377852 145721231
4718 1387092 0.8456133333 2444163196961
4720 1368800 0.8525735781 5931853116047
4722 798018 0.8208499645 63126509689
4724 1927392 0.9137557146 9631507165417
4726 1436704 0.8474484525 1081554964909
4728 997608 0.8826331534 457159963609
4730 1177770 0.7925444628 8252709146287
4732 723996 0.8275560049 2446077173
4734 1013076 0.7972189748 2227503505511
4736 374144 0.8089251738 1049177
4738 1331378 0.8449824963 322102867019
4740 616200 0.8374867911 35079078883
4742 1019530 0.8251804802 8239994179
4744 1892856 0.8523019576 19958061839741
4746 322728 0.8242463704 25539551
4748 356100 0.8672257307 161611
4750 1268250 0.8645165155 2502352535699
4752 1092960 0.8514531711 9258938335169
4754 1231286 0.7892730195 134353071551
4756 1112904 0.8082974840 58507371397
4758 494832 0.8244859283 734454311
4760 985320 0.7894969010 2395919782511
4762 1219072 0.9308036050 15409579657
4764 452580 0.8622914404 79985923
4766 1572780 0.8311913693 1739547200591
4768 1587744 0.8131646687 2956675908829
4770 887220 0.7789200810 13193937699571
4772 691940 0.8098206509 165985607
4774 1260336 0.8112539172 5739683343047
4776 448944 0.8442629551 90180059
4778 501690 0.9497720783 2376683
4780 1104180 0.8132485059 395693430791
4782 526020 0.8161806515 546710977
4784 1368224 0.8174372120 1683148638257
4786 789690 0.8598555091 322654259
4788 995904 0.8147188358 21770871850033
4790 1216660 0.8416658242 873768458473
4792 1269880 0.8330024589 92005688941
4794 661572 0.7960364440 20861219971
4796 1251756 0.8307730973 295346729533
4798 1679300 0.8446785055 3197716234463
4800 969600 0.8209328289 15571822465201
4802 388962 0.8869542712 1796987
4804 1710224 0.7782874527 13842179098073
4806 1206306 0.8333516049 13448938011913
4808 533688 0.8537185219 9679121
4810 274170 0.8519340567 570697
4812 307968 0.8415538293 3390703
4814 1473084 0.8271424430 1245798692843
4816 1247344 0.7877295603 1484176131853
4818 876876 0.8215487463 666432600907
4820 935080 0.8313203473 32487008371
4822 1750386 0.8577540614 4340143171271
4824 1201176 0.8698188410 6655443895757
4826 482600 0.8212477031 9305063
4828 1670488 0.7931469867 20747292365671
4830 454020 0.8785153116 4050952519
4832 1797504 0.8485095387 7995365520743
4834 1672564 0.8896834577 1301997325459
4836 614172 0.8180428160 8250971321
4838 1465914 0.7713956943 2688844111963
4840 1316480 0.8550815866 6997095903977
4842 1074924 0.8840456566 875855956663
4844 465024 0.8806644242 8374607
4846 688132 0.8601739780 77467669
4848 1110192 0.7856487086 8063436375157
4850 388000 0.8444615696 4839613
4852 1572048 0.8412827663 1143215029679
4854 961092 0.7804868212 973772706631
4856 1592768 0.8380868777 1446945776483
4858 1462258 0.8207158595 5283274725721
4860 704700 0.7812851332 286560716669
4862 1604460 0.8991146486 17381205974537
4864 812288 0.8810163626 486408491
4866 1124046 0.8356057290 3270645941561
4868 1630780 0.8590928041 1359358668541
4870 1344120 0.8735751658 1652489415169
4872 954912 0.8590073654 3091414128029
4874 731100 0.9439063939 54741157
4876 1482304 0.8250557169 1478412698227
4878 1034136 0.8224074757 1257853715861
4880 683200 0.7939954643 1562016139
4882 1635470 0.8558980255 1423810702421
4884 434676 0.8333452034 183889271
4886 747558 0.8734681702 619568773
4888 821184 0.7856745434 2810773463
4890 322740 0.9302432611 12434311
4892 826748 0.8516229144 451642253
4894 1747158 0.8243990452 6075857766151
4896 563040 0.8478787257 1071146539
4898 1077560 0.8095032996 22817244383
4900 764400 0.8228894964 16299646609
4902 676476 0.7730046246 28069830563
4904 818968 0.8186527675 600834991
4906 1501236 0.8367576017 2219095818727
4908 1173012 0.7979230970 10827220170911
4910 574470 0.8515239444 113538983
4912 1792880 0.8327591122 7574725685297
4914 545454 0.8596639821 4067682527
4916 1042192 0.8689515451 3954781777
4918 1091796 0.7998596761 17149465633
4920 319800 0.7628511092 72051739
4922 1717778 0.7963065272 16173410263259
4924 797688 0.7994122308 557381641
4926 1054164 0.8376718240 1072468422437
4928 1232000 0.8213657477 1376131327733
4930 1296590 0.8304159408 6598307178041
4932 1203408 0.7907077203 18298578679613
4934 1845316 0.7993224339 19412314489657
4936 1584456 0.8193829451 1466754802973
4938 1338198 0.8687111129 19679180418991
4940 350740 0.8672492232 4055353
4942 1225616 0.8124712787 404340010181
4944 726768 0.8416485436 9767120689
4946 1068336 0.8805527859 4180667681
4948 1603152 0.8345031758 1279124270959
4950 747450 0.8071641250 1159704007081
4952 891360 0.8149740548 1364101967
4954 1733900 0.8393620485 3501849078881
4956 594720 0.7723423113 16385484361
4958 1388240 0.9618399154 50569228469
4960 813440 0.8680593904 3930037487
4962 630174 0.8888727624 992107469
4964 1454452 0.8388185803 820409883907
4966 1455038 0.8268943841 1161574071641
4968 298080 0.8742764448 2054821
4970 685860 0.8377735104 3863252677
4972 1014288 0.8786013888 7231270463
4974 1218630 0.8120592137 11847620254121
4976 1771456 0.8635599699 3093357916003
4978 1762212 0.8347191886 11084980562807
4980 806760 0.7651954247 2047787890429
4982 1509546 0.8050403273 1443995177347
4984 1046640 0.8968469262 16174195679
4986 917424 0.7982685913 276068375017
4988 1281916 0.8583537673 87830579833
4990 1347300 0.7979239899 4407482390587
4992 524160 0.8022670052 905148287
4994 1812822 0.8971218655 9687146951987
4996 1533772 0.8372621149 582820048477
4998 324870 0.8595695977 18853409
5000 1365000 0.8722366178 1407287251891
5002 750300 0.8398345295 238656883
5004 415332 0.8897546225 19150451
[/CODE]

 mart_r 2022-09-09 16:03

[QUOTE=mart_r;612010]I'd like to take the search for T(38,16) in A[OEIS]086153[/OEIS] up to 10^16,[/QUOTE]

No solution for T(38,16) for p < 10^16.
Meh.
Oh well...
Anyone else holding their breath for the 3rd season of "The Owl House"?

 Bobby Jacobs 2022-09-17 18:29

No. I have never heard of that show.

 mart_r 2022-09-18 12:59

[QUOTE=mart_r;596734]As a by-product, a puzzle:
Given x, find the next three consecutive primes >= x. Denote the two gaps between them g[SUB]1[/SUB] and g[SUB]2[/SUB], and let g[SUB]1[/SUB] >= g[SUB]2[/SUB]. Let r = g[SUB]1[/SUB]/g[SUB]2[/SUB].
As x becomes larger, the geometric mean r[SUB]gm[/SUB] of values of r also become larger. Find an asymptotic function f(x) ~ r[SUB]gm[/SUB].[/QUOTE]

What I have so far (without explicitly claiming to be correct):

Using a Poisson distributed random model, i.e. with random variables 0 < x[SUB]n[/SUB] < 1 turned into a function equivalent to the merit m[SUB]n[/SUB] = -log(1-x[SUB]n[/SUB]), we want two consecutive values m[SUB]1[/SUB] and m[SUB]2[/SUB] such that m[SUB]1[/SUB] >= m[SUB]2[/SUB] and then the geometric mean r[SUB]gm[/SUB] of (m[SUB]1[/SUB], m[SUB]2[/SUB]).

For given x[SUB]2[/SUB], we use a function f(x[SUB]2[/SUB]) that gives the geometric mean of m[SUB]1[/SUB]/m[SUB]2[/SUB] for all m[SUB]1[/SUB] >= m[SUB]2[/SUB]. We have
[$]\log (f(x_2)) = \frac{\int_{x_2}^1 \log(-\log(1-y)) \: \text{d}y}{1-x_2} - \log(-\log(1-x_2)).[/$]

Taking all x[SUB]2[/SUB] into account, we would get
[$]\log(r_{gm})=2 \cdot \int_0^{1-\varepsilon} (1-z) \log(f(z)) \: \text{d}z[/$]
and lim r[SUB]gm[/SUB] = 4 for [$]\varepsilon \to[/$] 0 - [I]numerically[/I]. I don't yet know how to prove that mathematically, but as I said, I'm sure the tools are available and I leave that as an exercise for those who are more comfortable working with integrals as I am.

[QUOTE=Bobby Jacobs;613597]No. I have never heard of that show.[/QUOTE]
To me it's one of the best Disney shows I've seen since Chip'n'Dale's Rescue Rangers in the early 90s.
I don't use streaming services, but I would be curious whether it's available on any of the popular platforms, and unabridged at that. I know that it's at least partially censored in some countries... but I don't want to spoiler anything :smile: Just, if you do, be careful to watch it in chronological order since it follows a single story plot.

 mart_r 2022-09-19 16:29

Where's the revolution? C'mon, people, you're letting me down!

The "puzzle" with the geometric mean of consecutive gaps can be generalized: for n consecutive gaps the average ratio of the largest gap divided by the smallest gap appears to be as follows (rounded to three decimal places for n>=4):
[CODE] n r_gm
1 1
2 4
3 8
4 12.641
5 17.757
6 23.249
7 29.052
8 35.121
9 41.423
10 47.928[/CODE]
I'm afraid these numbers will give me headaches.
1.8 n (0.38 + log n) is an asymptotic facsimile for n<=1000, but we want more than this.

What is it that I should ask myself?

 mart_r 2022-09-21 21:52

r_gm @ n=3 = 12.64200 ± 0.000015

1 Attachment(s)
All work and no pay makes me wish life wouldn't be so dull.

Here, I give you the first occurrence gaps for k=1000 up to p=2*10^14.

You'll find me in the kitchen.

[SIZE="1"]PS: To this day I've never expressed my continual deep appreciation for the brilliantly derived [URL="https://www.mersenneforum.org/showpost.php?p=188795&postcount=21"]joke[/URL] that came via [URL="https://www.mersenneforum.org/showpost.php?p=188790&postcount=20"]that[/URL] calculation from [URL="https://www.mersenneforum.org/showpost.php?p=188709&postcount=14"]this[/URL] old idea of mine.[/SIZE]

 mart_r 2022-09-24 11:57

I stand corrected

[QUOTE=mart_r;613861]r_gm @ n=3 = 12.64200 ± 0.000015[/QUOTE]

While I'm at it, here are the values up to n=13, corrected to be within +/- about 2 sigma:
[CODE] 1 1
2 4
3 8
4 12.642007 ± 0.000009
5 17.75797 ± 0.00002
6 23.24943 ± 0.00003
7 29.05309 ± 0.00003
8 35.12109 ± 0.00004
9 41.42190 ± 0.00004
10 47.92674 ± 0.00005
11 54.62285 ± 0.00005
12 61.47478 ± 0.00006
13 68.49414 ± 0.00006[/CODE]

 Bobby Jacobs 2022-10-01 22:51

[QUOTE=mart_r;613861]All work and no pay makes me wish life wouldn't be so dull.
[/QUOTE]

You should get paid for this.

 mart_r 2022-10-03 12:45

[QUOTE=Bobby Jacobs;614723]You should get paid for this.[/QUOTE]

For that comment? Yeah, that was a tremendous outburst of creativity possibly worthy of a Pulitzer :wink:
But you lifted my mood, so I give a small update.
Prime scarcities with CSG > 1 are hard to find these days, but recently I got p[SUB]n[/SUB] = 205,465,264,987,331 which has
CSG = 1.0024950 for k = 927,
CSG = 1.0028949 for k = 941, and
CSG = 1.0063712 for k = 939.

 Bobby Jacobs 2022-10-16 22:22

You should get paid for all of the work you do in finding prime numbers.

 mart_r 2022-10-17 11:50

The replies that I get mean more to me than any amount of money (which is too tight to mention anyway :smile:).

 mart_r 2022-11-25 20:57

Eins Zwei Drei Vier Fünf Sechs Sieben Acht

Not a record in terms of CSG, but a close contender - and the largest p for which a CSG (or "scarcity/paucity ratio") > 1 is known:
A region with exceptionally few k+1 consecutive primes for k=274..380 (listed only for CSG > 1)

[CODE]k k-gap p start CSG
274 12914 309292876045019 1.00720962
275 12950 309292876045019 1.00580100
276 12996 309292876045253 1.00890285
277 13050 309292876045019 1.01561044
278 13110 309292876045019 1.02503096
279 13156 309292876045093 1.02813121
280 13230 309292876045019 1.04390467
281 13244 309292876045019 1.03252630
282 13300 309292876044949 1.04014280
283 13318 309292876044931 1.03061882
284 13342 309292876044907 1.02384129
285 13398 309292876044731 1.03143202
286 13438 309292876044811 1.03184383
287 13518 309292876044731 1.05023223
288 13542 309292876044707 1.04343738
289 13566 309292876044683 1.03667817
290 13580 309292876044683 1.02549729
291 13590 309292876044673 1.01261680
292 13620 309292876044629 1.00864965
293 13662 309292876044731 1.00999419
294 13700 309292876044731 1.00957620
295 13728 309292876044731 1.00476373
313 14448 309292876045019 1.01377017
314 14462 309292876045019 1.00309794
315 14518 309292876044949 1.01051652
316 14552 309292876045019 1.00847219
317 14604 309292876045019 1.01416841
318 14634 309292876045019 1.01041245
319 14674 309292876044949 1.01095647
320 14736 309292876044731 1.02093989
321 14760 309292876044707 1.01462007
322 14784 309292876044683 1.00833143
323 14840 309292876044731 1.01572021
324 14892 309292876044731 1.02140336
325 14922 309292876044731 1.01768328
326 14960 309292876044731 1.01738801
327 14984 309292876044707 1.01114162
328 15008 309292876044683 1.00492570
331 15134 309292876045019 1.00919910
332 15180 309292876045253 1.01231622
333 15220 309292876045213 1.01289750
334 15256 309292876045177 1.01179308
335 15340 309292876045093 1.03098513
336 15414 309292876045019 1.04600439
337 15432 309292876045019 1.03721965
338 15484 309292876044949 1.04288334
339 15502 309292876044931 1.03413607
340 15526 309292876044907 1.02796453
341 15582 309292876044851 1.03529999
342 15622 309292876044811 1.03588507
343 15702 309292876044731 1.05337889
344 15726 309292876044707 1.04718529
345 15750 309292876044683 1.04102057
346 15768 309292876044683 1.03236619
347 15778 309292876044673 1.02041740
348 15804 309292876044629 1.01519709
349 15832 309292876044601 1.01083020
350 15850 309292876044601 1.00234451
351 15906 309292876044527 1.00959606
352 15924 309292876044527 1.00113860
379 16980 309292876043453 1.00929898
380 16998 309292876043453 1.00114922
[/CODE]

 mart_r 2023-01-05 22:04

New year, new exceptional gaps

New exceptional gaps, for p = 343,408,238,858,639 each:
[CODE]k gap CSG
254 12174 1.0071454
255 12230 1.0147599
256 12248 1.0048780 (also for p-18)[/CODE]

[QUOTE=mart_r;613704]The "puzzle" with the geometric mean of consecutive gaps can be generalized: for n consecutive gaps the average ratio of the largest gap divided by the smallest gap appears to be as follows (rounded to three decimal places for n>=4):
[CODE] n r_gm
1 1
2 4
3 8
4 12.642
5 17.758
6 23.249
7 29.053
8 35.121
9 41.422
10 47.927[/CODE]
I'm afraid these numbers will give me headaches.
1.8 n (0.38 + log n) is an asymptotic facsimile for n<=1000, but we want more than this.
[/QUOTE]

Since those numbers are taken from the underlying distribution process, it may also apply to primes in any admissible residue class r mod q.
As a heuristical reality check, here's a sample of 30 consecutive primes congruent to 7 mod 1983:
[CODE]prime; mod 1983=7 gap ratio ratio ratio ratio
10^2023+24724407 2 gaps 3 gaps 4 gaps 5 gaps
10^2023+25533471 809064 max/min max/min max/min max/min
10^2023+32002017 6468546 7.99510
10^2023+47417859 15415842 2.38320 19.0539
10^2023+53751561 6333702 2.43394 2.43394 19.0539
10^2023+59791779 6040218 1.04859 2.55220 2.55220 19.0539
10^2023+95803059 36011280 5.96192 5.96192 5.96192 5.96192
10^2023+95870481 67422 534.118 534.118 534.118 534.118
10^2023+106816641 10946160 162.353 534.118 534.118 534.118
10^2023+110156013 3339372 3.27791 162.353 534.118 534.118
10^2023+116216061 6060048 1.81473 3.27791 162.353 534.118
10^2023+117687447 1471386 4.11860 4.11860 7.43935 162.353
10^2023+126531627 8844180 6.01078 6.01078 6.01078 7.43935
10^2023+141193929 14662302 1.65785 9.96496 9.96496 9.96496
10^2023+145504971 4311042 3.40110 3.40110 9.96496 9.96496
10^2023+146421117 916146 4.70563 16.0043 16.0043 16.0043
10^2023+147230181 809064 1.13235 5.32843 18.1225 18.1225
10^2023+151517427 4287246 5.29902 5.29902 5.32843 18.1225
10^2023+154829037 3311610 1.29461 5.29902 5.29902 5.32843
10^2023+161190501 6361464 1.92096 1.92096 7.86275 7.86275
10^2023+167615421 6424920 1.00998 1.94012 1.94012 7.94118
10^2023+171010317 3394896 1.89252 1.89252 1.94012 1.94012
10^2023+172049409 1039092 3.26718 6.18321 6.18321 6.18321
10^2023+172398417 349008 2.97727 9.72727 18.4091 18.4091
10^2023+174893031 2494614 7.14773 7.14773 9.72727 18.4091
10^2023+177062433 2169402 1.14991 7.14773 7.14773 9.72727
10^2023+177895293 832860 2.60476 2.99524 7.14773 7.14773
10^2023+182031831 4136538 4.96667 4.96667 4.96667 11.8523
10^2023+190796691 8764860 2.11889 10.5238 10.5238 10.5238
10^2023+197411979 6615288 1.32494 2.11889 10.5238 10.5238

geometric mean: 3.70023 7.86887 13.4903 20.6196[/CODE]

This can be generalized further to gaps between non-consecutive primes as well - either dependent on one another when running through consecutive primes (e.g. in the case k=2: 3-7, 5-11, 7-13, 11-17 etc.) or independent (by taking the differences at every other prime like 3-7, 7-13, 13-19, 19-29 etc.). Eventually these numbers appear for k=2:
[CODE] r_gm r_gm (geometric mean of ratio of maximal vs. minimal gap of n consecutive gaps between a prime and the k'th next prime (here k=2), limits as prime --> oo)
n dep. indep.
1 1 1
2 1.85 2.43
3 2.88 3.77
4 3.85 5.05
5 4.82 6.25
6 5.76 7.40
7 6.69 8.50
8 7.59 9.56
9 8.47 10.58
10 9.33 11.58
11 10.17 12.54
12 11.00 13.47
13 11.81 14.39[/CODE]

By now I think I've lost my audience for good... [COLOR="White"](not to mention my mind ;)[/COLOR]

 Bobby Jacobs 2023-01-08 23:53

You have not lost me. It is interesting that the first 3 numbers are integers:1, 4, 8. However, the next numbers are not integers. I wonder why that is.

 mart_r 2023-01-09 19:18

I'm star walkin'

1 Attachment(s)
[QUOTE=Bobby Jacobs;622006]You have not lost me. It is interesting that the first 3 numbers are integers:1, 4, 8. However, the next numbers are not integers. I wonder why that is.[/QUOTE]

You're truly my most loyal follower in this thread!
To be honest, I'm not entirely sure it's exactly 8 at n=3, rather 8.000000 ± 0.000007, ballpark. I still don't know how to pin the numbers down exactly.
I'm not so much wondering why the first few numbers are integers, there are a lot of sequences that start out with integers before fractional or even irrational numbers appear. What concerns me more is that I wasn't able to find a satisfying asymptotic approximation formula for larger n.

As a follow-up to [URL="https://www.mersenneforum.org/showpost.php?p=609511&postcount=55"]post # 55[/URL], I've attached the data for 2*10^14 < p < 3.33333333333333*10^14, k <= 109.
Meanwhile I've also looked for T(38,16) up to 2*10^16 - assuming the attached list in post # 58 is complete -, to no avail.

 All times are UTC. The time now is 23:26.