A rash guess about distribution of primes based on meager empirical evidence?

Between the prime numbers $n=1327$ and $n+k = 1327+34 = 1361$ there are $k-1=33$ consecutive composite numbers.

If you double those bounding primes, getting $2\times1327=2654$ and $2\times1361=2722$, then between them you find $14$ primes, i.e. in the interval $[2654,2722]$ you have $2k+1=69$ numbers of which one out of every $69/14 = 4.92857\ldots$ is prime. With numbers that big you'd expect somewhat fewer than one in six or seven, if I'm not mistaken.

Herewith a wild guess: Is this larger interval compensating for the dearth of primes in that smaller interval, in the sense that for consecutive primes $n$ and $n+k$ with $k/n$ unusually big, you would typically find a more-than-expected number of primes between $2n$ and $2(n+k)$?

PS: For the record: $$2657, 2659, 2663, 2671, 2677, 2683, 2687, 2689, 2693, 2699, 2707, 2711, 2713, 2719$$

1 Answer

Let's check!

I took a list of the first 75 record gaps (all such gaps up to $4\cdot10^{18}$) and computed the surplus/deficit as follows:

Length: $2k$
Expected number of primes: $a=(2k)/\log(2n+k)$
Actual number of primes: $b=\pi(2n+2k)-\pi(2n)$
Surplus/deficit: $b-a$

Your wild guess is that the surplus/deficit is large. I don't see evidence for that below. In fact, the differences seem quite small and with no discernable trend in the sign that I could notice.

$n$: $b-a$
(surplus/deficit) 2: -0.242669869
3: -0.923593388
7: -0.767810050
23: -1.03701843
89: 0.938236581
113: 0.891106604
523: -0.165147951
887: 0.661116394
1129: 1.30931270
1327: 5.38864735
9551: -2.30265253
15683: -3.49840717
19609: 0.168474670
31397: -1.03313586
155921: -4.59627080
360653: -0.233870990
370261: 2.42614428
492113: 4.47793359
1349533: -2.93683604
1357201: -0.820822736
2010733: 0.535527956
4652353: 2.80524180
17051707: -2.75536459
20831323: 2.06172047
47326693: 3.04234128
122164747: -1.98847103
189695659: 5.30869089
191912783: 4.90602331
387096133: 1.57082568
436273009: -1.39602758
1294268491: 2.42481937
1453168141: 7.19891084
2300942549: 12.2356085
3842610773: 0.477843887
4302407359: -3.95002441
10726904659: 2.88454318
20678048297: 1.58315643
22367084959: 2.86821530
25056082087: -2.01669826
42652618343: 1.12998121
127976334671: 2.36764149
182226896239: 5.38990656
241160624143: 3.86869109
297501075799: 1.85341864
303371455241: 1.14229752
304599508537: 5.11592277
416608695821: -2.59760017
461690510011: 11.3811436
614487453523: -0.365925500
738832927927: 2.45814519
1346294310749: -5.66869373
1408695493609: -9.02301866
1968188556461: -5.51540625
2614941710599: -7.52729176
7177162611713: -14.4956850
13829048559701: -9.26676981
19581334192423: -6.94764939
42842283925351: -1.50117974
90874329411493: -4.97415314
171231342420521: -9.16658637
218209405436543: 8.24680393
1189459969825483: -7.74348578
1686994940955803: 3.31473651
1693182318746371: 5.68644133
43841547845541059: 2.30151452
55350776431903243: -0.0514077826
80873624627234849: -2.57758027
203986478517455989: -4.36994750
218034721194214273: 0.547260030
305405826521087869: 5.88086588
352521223451364323: 11.3724657
401429925999153707: -6.78220238
418032645936712127: -4.39610157
804212830686677669: -5.79477642
1425172824437699411: -18.4686767