FindingMath

Trimming lists of possible prime positions tightens the span bounds for groups of five or six primes

Version 2 Published 2026-11-20 DOI 10.5281/zenodo.24408058

Importance (self-rated) Useful

It gives sieve specialists exact subset optima for two released constructions and a criterion for when further endpoint deletions pay.

Why it matters

One way to prove that five or six primes repeatedly occur close together starts with a list of possible prime positions. We found that shortening two such lists tightened the bounds almost as far as possible: looking beyond the original ends bought nothing more for five primes and only 12 more units for six. That limit applies to what these lists can prove, not to how close primes can be.

How short an interval can contain five or six primes infinitely often? One way to show that a given span is possible is to mark positions on the number line, slide them all by the same amount, and count how many land on primes. Using more positions helps with the count. But if two marks are too far apart, primes at those marks cannot belong to the same short interval. Earlier calculations used lists of selected sizes, leaving open whether removing some marks would improve the bound.

We determined the best bound over all choices of positions from two published lists and from extensions of those lists. With the sharper of two published estimates used in the test, the shortest span the test accepts is 82,188,372 for five primes and 4,816,799,794 for six. Trimming the published lists alone reaches the five-prime minimum and comes within 12 of the six-prime minimum.

How pairs of positions determine the bound

A list specifies positions relative to a common starting integer n. Each entry, or shift, is an integer h marking a possible prime at n+h. The list must be admissible: for each prime p, at least one remainder on division by p must be absent from the shifts. Otherwise every choice of n would place at least one position on a multiple of p.

Let p_n be the nth prime. The difference p_{n+m}-p_n is the span from the first to the last of m+1 consecutive primes. The quantity H_m=\liminf_{n\to\infty}(p_{n+m}-p_n) gives the smallest such span that recurs infinitely often. For example, H_4\le D means that infinitely many intervals with endpoint difference D contain at least five primes.

Kapila's pair-penalty sieve is a mathematical test for a proposed span D. It uses a weighted count of primes at the marked positions. The list itself can be wider than D: the test charges a penalty for each pair of shifts more than D apart, counting each such long pair once. If the number of long pairs stays within an allowance, the sieve guarantees that intervals of span D contain at least m+1 primes infinitely often.

Two inputs determine the allowance: the number of shifts retained and a ratio called the quotient, which measures how much the weighting function contributes to the prime count. A larger lower bound on the quotient permits more long pairs. Removing a shift cuts the number of pairs but also changes the allowance. Whether trimming pays depends on both changes.

Kapila's certificates for prime-cluster bounds give calculations at selected list sizes. A November release of shifts and sieve estimates supplies the five-prime list of 5,089,150 shifts and sharper quotient estimates. The six-prime list comes from Giraudin's construction, which gives a span of 4,817,211,684 using 232,465,000 shifts and Kapila's printed quotient.

Minimum spans

Table 1 gives the smallest span accepted by the pair-count test in each search. “Printed” uses Kapila’s lower bound on the quotient; “sharper” uses the November estimate. The first two result columns use only the published shifts. For the last two, we extended each list at both ends, using the same rules to decide which positions to include. In each pool we compared keeping the published list size with allowing the size to vary.

Primes Quotient Published set, unchanged Published set, any size Extended pool, published size Extended pool, any size
5 Printed 82,205,490 82,205,490 82,205,490 82,205,490
5 Sharper 82,190,538 82,188,372 82,190,538 82,188,372
6 Printed 4,817,211,684 4,817,180,226 4,817,211,684 4,817,180,220
6 Sharper 4,816,912,080 4,816,799,806 4,816,912,056 4,816,799,794

For five primes, trimming the published list saves 2,166 with the sharper quotient. Extending the pool gives no further gain. With the printed quotient, neither trimming nor extending improves the span.

For six primes, changing just the quotient on Giraudin's unchanged list brings the span down to 4,816,912,080. Keeping the first shift and dropping the last 34,108 saves another 112,274, the most any subset of that list can save. Extending the pool saves only 12 more. Within the extended pool, allowing the size to vary rather than fixing it at 232,465,000 saves 112,262 with the sharper quotient and 31,464 with the printed quotient.

Why consecutive entries suffice

A window is a run of consecutive entries in the ordered pool. Any subset that passes the test can be turned into a window of the same size that also passes, provided the pool's width is at most 2D. This lets us find the best span over all subsets by checking only windows.

To see why, take a subset that skips an entry between its endpoints. Move the nearer endpoint to the skipped entry. The move covers at most half the distance between the endpoints, hence at most D. Any selected point passed along the way lies within D of the new endpoint. Points farther into the subset get closer to that endpoint. No new long pair forms, and fewer pool entries now lie between the endpoints. Repeating the exchange until no gaps remain gives the required window.

Both pools meet the width condition at each reported minimum and at the preceding even span. Within each pool the shifts are either all even or all odd, so every pair distance is even. Lowering an attained even span D by any positive amount less than two therefore gives the same pair count as testing D-2. If every window fails at D-2, so does every subset. Lowering the span further can only add long pairs.

Counts at the minimum

Table 2 gives a qualifying window for each minimum found by varying the size in an extended pool. The window contains every pool entry from the first shift shown to the last. The distance between those shifts exceeds the target prime span D; the test allows this because the long-pair count stays within the allowance. For the last column we lowered the target span by two and checked every eligible window. It gives the fewest excess pairs in any window, measured against the allowance for that window’s size.

Primes Quotient First and last shifts Size Long pairs / allowance Smallest excess at D-2
5 Printed -37,933,474 to 44,319,256 5,089,146 4,064,292 / 4,064,820 133
5 Sharper -37,927,852 to 44,308,934 5,088,177 4,273,248 / 4,273,281 569
6 Printed -2,427,798,523 to 2,391,139,279 232,448,311 3,315,666,464 / 3,315,678,345 1,767
6 Sharper -2,427,824,911 to 2,390,739,487 232,430,850 3,328,755,015 / 3,328,756,683 3,736

At the sharper six-prime minimum, the window shown clears its allowance by 1,668 pairs. Two units lower, even the best window exceeds its allowance by 3,736 pairs.

At the preceding even spans, the exhaustive checks with the sharper quotients covered 74,316,479 windows for five primes and 41,658,662,843 for six. A second count at the attained spans found 132 and 40,760 qualifying windows, respectively. Every integer size occurs in the respective ranges 5,088,171–5,088,183 and 232,430,792–232,430,907. No other size qualifies: any passing subset would give a passing window of the same size. The counts are of windows; other subsets may also pass.

The endpoint counts show why the benefit from trimming stops. For the sharper six-prime window in Table 2, the allowance changes if we delete one more shift. To pass the sieve inequality by as much as before, the deletion must save at least 81,727 long pairs. Deleting the left endpoint saves 81,724; deleting the right saves 81,723. Adding back the first omitted shift on the left or right would introduce 81,727 or 81,728 long pairs, respectively. These comparisons locate a stopping point for trimming that window. The exhaustive counts establish the minimum over the pool.

Methods

Constructing the pools

The five-prime release uses the same set of shifts for both quotients, from −37,934,836 to 44,318,042. The release specifies forbidden residue classes, each of which excludes all integers with a particular remainder for a particular prime. Removing those classes from the interval recovered exactly the published set. We applied the exclusions to 200,000 more integers on each side, giving an extended pool of 5,111,211 shifts.

For six primes we reconstructed Giraudin's set from Kapila's table of residue classes and Giraudin's amendments to the table. The set contains selected primes above ten million, selected negatives of such primes, and the two integers −1 and 1. Its endpoints are −2,427,786,701 and 2,391,510,637. If a prescribed missing class contained −1 or 1, we chose the first absent class starting at remainder 2. Applying these exclusions inside the published interval recovered the same set. We extended the search by 4,000,000 integers on either side, retaining signed primes that passed the same exclusions, for a total of 232,824,829 shifts.

The sieve starts with a function of k coordinates, one for each possible shift in the calculation. This sets the maximum subset size at k shifts. An independent membership check verified that each extended pool omits a residue class for every prime through its corresponding k, given below. For any larger prime there are more classes than shifts in the subset, so at least one class must be absent.

Computing the allowance at each size

The weighting function in Kapila’s sieve treats the coordinates symmetrically. The allowance therefore depends only on how many shifts we retain. Write K\le k for the number retained and K_0 for the published list size. Changing K changes both the benefit \beta(K) from rescaling the retained coordinates and the cost C(K) of one long pair. In the table, the subscript 0 marks values at K_0, and q is the quotient lower bound. The parameter r limits the rescaling factor to r/(r-1), and \eta sets the weight in the integral used to compute the pair cost. The decimal inputs are exact.

m k K_0 r \eta \beta_0 C_0 q, printed / sharper
4 5,090,000 5,089,150 10 1.081 .00015523001241465 1.945365350719 × 10⁻¹¹ 15.23857870587577 / 15.2388031515275
5 232,500,000 232,465,000 4 1.082 .00014210693394371 1.491020798040 × 10⁻¹⁴ 19.04804762745624 / 19.0481293148757

The pair cost depends on an integral, J(K)=J_K(K\eta), defined in Kapila’s equation (8.4). Over the triangle u,v\ge0, u+v\le1, integrate the reciprocal of

(1-u-v+K\eta u)(1-u-v+K\eta v)+\tfrac12 K\eta^2(u-v)^2
against du\,dv. Write \binom{k}{r} for the number of ways to choose r coordinates from k. With Kapila’s limiting sieve parameter \rho=151320927303522335/2^{59}, the benefit, cost and resulting threshold F(K) for long pairs are
\beta(K)=\beta_0\frac{\binom{k}{r}-\binom{K}{r}}{\binom{k}{r}-\binom{K_0}{r}},\qquad C(K)=C_0\frac{J(K)}{J(K_0)},\qquad F(K)=\frac{\rho q K/k-m(1-\beta(K))}{C(K)}.
Here F(K) expresses the allowance before rounding: dividing the available benefit by the cost of a pair tells us how many pairs the sieve can tolerate. A set passes if its long-pair count B_D is strictly below F(K). The largest allowed integer count is therefore A(K)=\lceil F(K)\rceil-1. A nonpositive numerator rules out the size without evaluating J.

The formula for \beta(K) follows from Kapila's equation (10.2). Its lower bound on the benefit is a fixed mean for the original trial function divided by r, times 1-\binom{K}{r}/\binom{k}{r}. Rescaling the conservative bound \beta_0 by the ratio of this factor at K to its value at K_0 gives the stated benefit. For the cost, Kapila's Proposition 10.2 multiplies J(K) by a coefficient independent of K. The ratio of integrals thus gives the change in the raw cost, before any division by 1-\beta(K). To obtain the sharper q values, we took the lower endpoints of the released quotient estimates, subtracted the bounds on the loss from restricting the trial function's support, and rounded down. The strict inequality leaves room to approach the limiting sieve parameters as in Kapila §11.4.

Only sizes near k can pass. To see how the numerator of F changes as shifts are removed, let \mu=r\beta_0/[1-\binom{K_0}{r}/\binom{k}{r}]. By Pascal's identity for binomial coefficients, the first deletion from k shifts increases \beta by \mu/k, and subsequent increases are smaller. Since \rho q>m\mu in each case, the numerator decreases with every deletion. Exact rational comparison for the sharper quotients leaves only 0\le k-K\le3,253 for five primes and 0\le k-K\le109,717 for six.

We computed each allowance from the closed form for J in Kapila (8.8) using interval arithmetic, which gives lower and upper bounds throughout the calculation. We used the resulting integer allowance only when rounding each bound up gave the same integer. We checked the allowances a second way. We evaluated the one-dimensional integral in Kapila’s §8.3 at eight nearly equally spaced integer sizes across the eligible range, then used a degree-seven polynomial through those values to estimate the integral at the intervening sizes.

To bound the interpolation error, write the denominator of the defining integral at fixed u,v as P(K)=a+bK+cK^2 with nonnegative coefficients. For a change h in size, set t=h/K. Then P(K)/P(K+h) is the reciprocal of 1+st+wt^2, with 0\le s\le2 and 0\le w\le1. The recurrence for the coefficients of this reciprocal bounds its nth coefficient in absolute value by (5/2)^n. Integrating gives the derivative bound |J^{(8)}(K)|/8!\le(5/(2K))^8J(K). Since J decreases, the interpolation error on an interval of length L starting at K_{\min} is at most (5L/(2K_{\min}))^8J(K_{\min}). With this error included, the two evaluations agreed on every integer allowance. Using the full numerical endpoints of the released estimates in place of the shortened constants added at most one pair per allowance and no eligible sizes. Every minimum found by varying the size stayed the same.

Finding and checking the minimum

We first located the minimum by tracking how much each deletion saved. With the left endpoint fixed, deleting the right endpoint saves one pair for each retained shift more than D to its left. As the right endpoint moves inward, the number saved at each step cannot increase. To preserve or improve the margin F(K)-B_D, a deletion must save at least \lceil F(K)-F(K-1)\rceil pairs. Interval arithmetic verified that this threshold never fell with successive deletions over the eligible sizes tested. Once a deletion saved too few pairs, no later deletion could help. This stopping rule lets us use binary search, halving the range of candidate endpoints at each step, to find the best right endpoint for each left endpoint. We then used binary search on the even spans to find the smallest one that passed.

A separate enumeration checked every eligible window at that span and at the preceding even span without using the stopping rule. For each possible right endpoint, we tabulated how many pool entries were more than D to its left. Dropping i entries on the left reduces that count by i, down to a minimum of zero. Cumulative sums of the tabulated counts gave the initial pair total without listing individual pairs. At each left endpoint we started with the longest eligible window. Each time we removed the right endpoint, we subtracted its long-pair count and compared the remaining total with the allowance for the smaller window. We independently checked each window in Table 2 by scanning its shifts in increasing order. For each shift we counted earlier entries strictly below that shift minus D. Summing those counts reproduced its long-pair total.

These minima are exact for the specified pools and pair allowances. Interpreting them as bounds on infinitely recurring prime clusters relies on Kapila's analytic criterion and the cited bounds on its inputs. Other pools or sieve estimates could yield shorter spans. The minimum span accepted by the test is not a lower bound on how closely primes themselves can cluster.