FindingMath

At fixed density, the largest relative shortage of equally spaced runs in uniform sets shrinks exponentially

Version 1 Published 2026-11-24 DOI 10.5281/zenodo.24517861

Importance (self-rated) Notable

Determines the fixed-density exponential rate for the full prime-cycle uniformity problem, not only for a particular torus construction.

Why it matters

A set of numbers can pass a test for randomness yet contain fewer evenly spaced runs than chance predicts. When half the numbers are kept and the test gets stronger with the run length, even the worst shortage for 32-number runs is at most about 1.31 parts per million of the expected count in the limit of increasingly large prime cycles. Yet examples with a shortage exist at every run length from four onward, and their shortage shrinks at the same exponential rate as the ceiling.

When can we predict how many runs of equally spaced numbers a set contains just by knowing its density, the fraction of numbers it contains? If each number is kept independently with probability \alpha, a run of k distinct, equally spaced numbers (an arithmetic progression) survives with probability \alpha^k. For sets chosen by a rule, mathematicians use tests of uniformity to decide when that prediction is reliable. Longer runs require a stronger test. Even one order below the level that guarantees the random count, a set can pass the test yet contain fewer runs than predicted. Examples at low density leave open how large a fraction of the predicted count can be missing when density stays fixed and runs get longer.

With the test kept one order below that threshold, we find that even the largest missing fraction shrinks exponentially with run length. Its kth root tends to \sin(\pi\alpha)/(\pi\alpha), which is 2/\pi when the set contains half the numbers. At half density and length 32, at most about 1.31 parts per million of the random count can be missing in the limit. The result concerns numbers on a cycle of prime size: we first let the cycle grow at each length, then let the length grow. At every length k\ge4, we construct sets whose shortage is within a polynomial factor of the upper bound.

Measuring runs and uniformity

Let p be a prime. On the cycle of p residues, pick a start x and step d independently and uniformly. The progression density \Lambda_k(A) is the probability that all of x,x+d,\ldots,x+(k-1)d belong to A, with addition modulo p. We include d=0, which has probability 1/p. The uniformity test of order s looks for correlations among corners of an additive cube with s independent steps. It uses the centered indicator 1_A-\alpha, where 1_A is one inside the set and zero outside. For a real function f, the Gowers norm \|f\|_{U^s} raised to the power 2^s is the mean product of f over the 2^s points x+\sum_{i\in I} h_i, one for each subset I of \{1,\ldots,s\}, with independent uniform x,h_1,\ldots,h_s. We call a sequence of sets uniform of order s if \|1_{A_p}-\alpha\|_{U^s}\to0. Here A_p is the set on the cycle of size p, and the limit is over growing primes. This implies that the densities tend to \alpha.

Uniformity of order k-1 forces the limiting progression density to be \alpha^k. At order k-2, Deng, Tidor and Zhao constructed sets with far fewer progressions. For example, at any fixed odd length k\ge5, their count at small density is below every fixed power of \alpha once \alpha is sufficiently small. Shi and Dong obtained further small-density bounds for even lengths. Here we keep 0<\alpha<1 fixed and increase both the length and the order of the test. Let D_k^{\rm prime} be the largest limiting fractional shortfall: one minus the infimum of \liminf_{p\to\infty}\Lambda_k(A_p)/\alpha^k over sequences uniform of order k-2.

To see how a set can pass the test yet lose runs, we use a model of Deng, Tidor and Zhao that assigns a pair of coordinates to each position in a run. Their model has two circle coordinates, horizontal and vertical. Write h=k-1 and c_j=(-1)^j\binom hj for j=0,\ldots,h. The horizontal coordinates are x+jd for a uniform start and step on the unit circle \mathbb T=\mathbb R/\mathbb Z. Independently, the vertical coordinates y_j are uniform subject to the single relation \sum_j c_j y_j=0 modulo one. These coefficients take an hth finite difference, so the relation holds for the values of any polynomial of degree at most k-2. For example, at length four it reads y_0-3y_1+3y_2-y_3=0.

Think of the selection weight F(x,y) as the probability of keeping a point. It lies between zero and one. At almost every fixed horizontal coordinate x, its average over the vertical coordinate y must equal \alpha. The progression density is the average of \prod_j F(x+jd,y_j). Define D_k^{\rm tor} by taking the infimum of this average over Riemann integrable admissible weights, dividing by \alpha^k and subtracting from one (Deng, Tidor and Zhao, Definition 2.3).

Size of the deficit

The circle construction comes within a polynomial factor of the largest shortfall allowed on prime cycles. Specifically, put B=\sin(\pi\alpha)/\pi, R_\alpha=B/\alpha, and C=\binom{h}{\lfloor h/2\rfloor}, the largest binomial coefficient in the relation. For every k\ge4,

\frac{2}{(16k)^2(k-1)}(1-1/C)^k R_\alpha^k \ \le\ D_k^{\rm tor}\ \le\ D_k^{\rm prime}\ \le\ \frac{\alpha(1-\alpha)}{B^2} R_\alpha^k .
The upper bound also applies to a fractional excess. Since C\ge 2^{k-1}/k, the factor (1-1/C)^k in the lower bound tends to one. Both bounds therefore have the same limiting kth root, R_\alpha.

The lower bound guarantees a shortage at every length. Table 1 shows how far apart the bounds can be at a given length even though they agree on the exponential rate.

Length Construction lower bound Universal upper bound
4 5.28e-06 0.405
8 3.73e-07 0.0666
16 1.48e-09 0.0018
32 1.3e-13 1.31e-06

Table 1. Bounds on the worst fractional shortfall at half density, rounded to three significant figures. A shortfall of 0.01 means one percent fewer progressions than predicted.

Why the sine appears

A Fourier coefficient measures how strongly a weight varies with a particular periodic wave. The sine in the rate comes from asking how large one such coefficient can be. To see this, let f be a selection weight of mean \alpha on a torus V (a product of circles). Its Fourier coefficient at a frequency n is the integral of f against e^{-2\pi i n\cdot v}. For nonzero n, the phase n\cdot v is uniform on the unit circle when v is uniform on V. Rotate the coefficient to make it real. At fixed total mass, its real part is largest if all the mass fills the arc where the cosine is highest. Integrating \cos(2\pi t) from -\alpha/2 to \alpha/2 gives B.

The vertical relation singles out which waves affect the count. Take k such functions f_j, possibly different, and average their product on any translate (shift) of the set K=\{(v_j)\in V^k:\sum c_jv_j=0\}. If the frequency at position zero is r, eliminating v_0 using c_0=1 changes frequency n_j to n_j-c_j r at each other position. Integration gives zero unless n_j=c_j r for every j. Shifting K only multiplies each product of coefficients by a complex number of absolute value one. The zero term is \alpha^k. For all other terms bound the interior k-2 factors by B. Since |c_0|=|c_h|=1, the Cauchy–Schwarz inequality bounds the sum of products of endpoint coefficients by their root sums of squares multiplied together. Parseval’s identity identifies each endpoint sum of squares, with the zero frequency removed, as the variance. Thus

\left|\mathbb E_{K+v}\prod_j f_j-\alpha^k\right| \le B^{k-2}\sqrt{\operatorname{Var}(f_0)\operatorname{Var}(f_h)} \le B^{k-2}\alpha(1-\alpha).
To justify summing the waves, first smooth each function by convolving it with product Fejér kernels. These averaging kernels give approximations with finite Fourier sums and vanishing mean absolute (L^1) error. Each coordinate separately is uniform, so the product integral changes by at most the sum of those errors. If the torus consists of a single point, only the zero term occurs. Conditioning on x,d proves the upper estimate within the two-circle model.

A construction that matches the frequencies

To approach the bound, a progression must encounter a large coefficient at each of the frequencies c_j r for the same nonzero r. Giving every horizontal position the same sinusoid fails even at length four: no r makes frequencies r and 3r both fit. Instead, assign a strip of horizontal positions (a lane) to each required frequency. Figure 1 shows how a five-term progression can pass through frequencies 1,4,6,4,1 in order.

Five narrow vertical lanes on a field of constant weight. Moving up successive lanes, the weight oscillates once, four times, six times, four times and once.

Figure 1. Selection weights at half density for length five, with the first lane shifted by half a period. Only the part of the horizontal circle containing the lanes is shown. The weight between lanes and on the rest of the circle is one half.

Set M=C-1 and use units in which the horizontal circle has circumference N=16k. Lane i is [4i,4i+1) for 0\le i\le h. Let g be the indicator of the centered arc of length \alpha convolved with the normalized Fejér kernel with multiplier (1-|m|/(M+1))_+. Here the positive part (\cdot)_+ sets negative values to zero: smoothing tapers the coefficients and removes all frequencies above M in absolute value. The resulting real even function has values in [0,1], mean \alpha, and first coefficient b_1=BM/(M+1). Use this profile on each lane, changing its frequency to fit the binomial coefficient and shifting it by a phase \theta only on lane zero. On lane i set

F(x,y)=g(|c_i|y+\theta\,1_{i=0});
off the lanes set F=\alpha. This is admissible at every phase \theta.

If any site misses the lanes, its weight is constant, so every term with r\ne0 vanishes. If all sites land in lanes, represent their horizontal positions by real numbers (lifts) in [0,4h+1). Their successive differences are congruent modulo N and lie in an interval shorter than N, so are equal as real numbers. Each differs by less than one from four times the difference of its lane indices. The integer lane differences must therefore coincide. A length-k path on k indices with constant nonzero difference must traverse the lanes once, forward or backward. Each traversal has probability w=1/(N^2h): its two offsets from the left edges of the endpoint lanes vary freely in the unit square and linear interpolation puts every intermediate offset inside its lane. The change from first position and lifted step to endpoints has Jacobian h; there is only one permitted lift for that traversal.

Consider a path that stays in one lane, whose frequency is q. Its weight has frequencies only at multiples of q. The endpoint forces r divisible by q for a term to survive, while the central site needs C|r|/q\le M<C. Thus r=0. On either traversal, binomial symmetry makes |c_i| the required frequency even on reversal. At harmonic r the product is b_r^k times e^{\pm2\pi i r\theta}, where b_r=\widehat g(r); only the endpoint in lane zero carries the phase.

To turn these surviving waves into a shortage, average the shift \theta with probability density 1-\cos(2\pi\theta). It gives weight -1/2 to each of the harmonics \pm1 and zero to all other nonconstant harmonics. The resulting count is \alpha^k-2wb_1^k. Some phase gives a count no larger than this average; equally spaced samples of M+2 phases with the same weights give exactly the same average. The phase average need not give the best constant: at length four and half density the second harmonic vanishes, so choosing \theta=1/2 doubles the guaranteed deficit.

Deng, Tidor and Zhao’s Proposition 2.2 connects the circle model to prime cycles. For a residue n, evaluate the weight at (n/p,n^{k-2}/p) in unit circle coordinates. Keep each residue independently with the resulting probability. In a progression or cube, repeated sites have probability O_k(1/p), so the expected progression density and centered cube average agree with their weighted versions up to that error (the implicit constant depends only on k). Two independent progressions share a site with probability O_k(1/p), which bounds the variance of the rounded count. Concentration of that count and Markov’s inequality for the nonnegative cube average give a sequence of sets with the claimed count and uniformity. The same transfer for every admissible weight gives D_k^{\rm tor}\le D_k^{\rm prime}.

Independent checks of the construction

We checked for paths that might wrap around the horizontal circle by enumerating the possible steps between endpoints. For each pair of endpoint lanes there are h possible steps modulo N between given endpoints. For each choice, we bounded the range of every intermediate position as the two endpoint offsets varied in the unit square. Using integer comparisons after multiplying by h, each choice either placed some intermediate position wholly outside the lanes or stayed on the lanes throughout the square, up to boundaries of zero area. This held at lengths 4 through 26, 32 and 40. At length 40 just 42 of 62,400 choices survived: 40 constant paths and the two traversals.

We also checked the sign of the shortage by summing weights directly when the vertical profile contains more than one frequency. At density 1/3 and cutoff two, the centered vertical profile, up to a common scale, is 4(z+z^{-1})+z^2+z^{-2} with z=e^{2\pi i y}. For each path at lengths 4 through 8 we summed the product directly on a cyclic grid subject to \sum c_j y_j=0, using convolution to update the sum for each partial value of the constraint as we added one site at a time. The grid order was the first prime above 2C(C+1), larger than any frequency in a free variable after eliminating y_0. To avoid floating-point cancellation we evaluated roots of unity modulo the first prime congruent to one modulo four times the grid order. Every constant path gave zero correction at each of the four quarter-period shifts. For each traversal the four shifts, weighted in the ratio 0:1:2:1, averaged to -4^k modulo the chosen prime, as the first-harmonic calculation predicts.

A separate scan with cutoff \min(k^2,C-1) tested 64 equally spaced endpoint phases. At each length from 4 through 32 and each density 1/8,1/4,1/2,3/4, at least one phase gave a deficit. The phase average explains why a deficit-producing shift exists without having to find it by search.

Why the same upper bound holds for every uniform set

The circle calculation also bounds a set that was never constructed from lanes. The proof uses a counting theorem to represent its progression count as an integral. In that integral the coordinates of highest polynomial degree can move together according to the same binomial relation as the vertical coordinates of the circle model. To use the Fourier bound, we need the mean weight to be \alpha when just those coordinates vary. This is where the uniformity test on the original set enters.

To make this precise, fix s=k-2 and a sequence of sets in the definition of D_k^{\rm prime}. Use the periodic regularity and counting theorems of Candela and Sisask (Theorems 5.1 and 4.1). Given \epsilon>0 and a growth function \mathcal F, the regularity theorem gives the decomposition 1_{A_p}=F(g(n)\Gamma)+e(n)+u(n) for all sufficiently large primes. The first term is the part used to count progressions. It evaluates a weight F with bounded rate of change (a Lipschitz weight) along a periodic polynomial path g(n)\Gamma on a filtered nilmanifold X=G/\Gamma: a compact space obtained by identifying points of a group G modulo a lattice \Gamma. Its coordinates are organized by polynomial degree, here at most s.

We may clip the weight to [0,1] since its orbit values already lie there. The space complexity and Lipschitz constant are bounded by m, itself bounded independently of p for fixed k,\epsilon,\mathcal F. The growth function sets the strength of an irrationality condition on the path, called \mathcal F(m)-irrationality, which lets the counting theorem replace an orbit average by a space integral. The errors satisfy \|e\|_2\le\epsilon, |u|\le1 and \|u\|_{U^{s+1}}\le1/\mathcal F(m).

Replacing the indicator by the structured term one position at a time changes the progression count by at most k(\epsilon+1/\mathcal F(m)). Use the mean absolute value for e and the progression generalized von Neumann inequality for u (iterated Cauchy–Schwarz, with p>k). The counting theorem approximates the resulting structured count by an integral to error \epsilon. The integrand F^{\otimes k} multiplies the weights at the k positions; the measure \mu is the invariant probability measure on the space of modeled progression tuples (the translated progression nilmanifold). Here and below we choose \mathcal F large enough for each stated tolerance at complexity m. The group describing progression tuples allows the same translation by an element of G at all positions (the diagonal copy of G). Each position therefore has a uniform distribution on X. The counting theorem applies both to one position and to the progression: the flag condition of Green and Tao holds since the degree-i exponent spaces, spanned by the tuples ((a+bj)^i)_j, are the evaluations of polynomials of degree at most i and hence are nested.

The mean over the highest-degree coordinates

To isolate the coordinates of highest degree, average over them while holding the remaining coordinates fixed. The group G_s of highest-degree coordinates is central (its elements commute with all of G), connected and rational with respect to the lattice \Gamma. Thus V=G_s/(G_s\cap\Gamma) is a torus, and removing it leaves a quotient Y=G/(G_s\Gamma) of degree at most s-1. Write \pi:X\to Y for the projection and H for the mean of F on each torus fiber, the set of points projecting to a given point of Y. Then T=(H-\alpha)\circ\pi is a test function with

\int_X (F-\alpha)T=\int_Y (H-\alpha)^2.
Evaluating T along the polynomial orbit gives what is called a nilsequence. Its values are bounded, its degree is at most s-1, and its complexity is bounded in terms of m. Indeed central translations preserve the right-invariant quotient metric, so averaging preserves the Lipschitz bound on X; on Y the adapted coordinates drop the final block and give a quotient Lipschitz bound depending only on m.

Uniformity controls the correlation with every such test at once. We use the contrapositive of Candela, González-Sánchez and Szegedy, Proposition 4.11. Given a degree bound s-1, a complexity bound L and a tolerance \eta>0, there is a \delta(s,L,\eta)>0 such that, on every finite abelian group Z,

\|a\|_\infty\le1,\quad \|a\|_{U^s(Z)}<\delta(s,L,\eta) \quad\Longrightarrow\quad |\mathbb E_{n\in Z}a(n)\overline{\psi(n)}|<\eta
for every polynomial nilsequence \psi of that degree and complexity with absolute value at most one. The proposition allows projected nilsequences; here the projection is the identity. Our test \psi(n)=T(g(n)\Gamma) factors through the polynomial orbit on Y. Periodicity makes this a polynomial map on Z=\mathbb Z/p\mathbb Z: lift the start and steps of any additive cube to integers and project the resulting orbit cube to Y.

The correlation estimate must work as the prime changes. A single complexity bound L=L_s(m) covers all these tests. To see why, use the adapted Mal’cev coordinates of Candela and Sisask, Definition 2.5. In these coordinates m bounds the dimension and the rational heights of the bracket coefficients (the sizes of their numerators and denominators in lowest terms). The bracket table specifies the group law, integer coordinates specify the lattice, and the block sizes specify the filtration. Thus there are finitely many coordinate models at this bound; dropping the last block gives finitely many quotient models. Take the maximum of their complexities and the quotient Lipschitz bounds for H-\alpha. The proposition allows the orbit itself to vary with p.

Choose the regularity growth function before decomposition so that 1/\mathcal F(m)<\min(\epsilon,\delta(s,L_s(m),\epsilon)) at each m, and so that both counting errors are at most \epsilon. One-position counting for (F-\alpha)T then approximates its space integral by its orbit mean to error \epsilon. In that mean, replacing F by 1_{A_p} costs at most 2\epsilon: the L^1 bound controls e, and the correlation estimate controls u since \|u\|_{U^s}\le\|u\|_{U^{s+1}}. With \epsilon and \mathcal F now fixed, regularity gives an upper bound m_* independent of p. For any \eta>0, the centered indicator eventually has U^s norm below the minimum of \delta(s,L_s(m),\eta) over the integers m\le m_*, so its correlation with the test tends to zero. Thus the mean squared error of the fiber means satisfies \|H-\alpha\|_2^2\le3\epsilon+o(1) by the integral identity, where the last term vanishes as p grows.

We can now give each fiber exactly the right mean. Mix F toward zero on fibers where H>\alpha and toward one where H<\alpha, stopping at mean \alpha. The change has one sign on each fiber, so its total L^1 cost is exactly \int_Y|H-\alpha|. Uniform coordinate marginals bound the cost in the product integral by k\|H-\alpha\|_2. This adjustment takes place after counting and needs no smoothness.

Applying the Fourier bound

The remaining step is to show that the progression integral allows all the shifts used in the Fourier calculation. The measure \mu is invariant under translation by K=\{(v_j)\in V^k:\sum c_jv_j=0\}. Indeed the progression group includes the top-layer polynomial translations of degree at most s (Green and Tao, §3). On V these have the form P(j)=\sum_{i=0}^s\binom ji v_i. Successive differences give coefficients realizing arbitrary first s+1 values, and the binomial relation determines the last value since |c_h|=1. Hence these translations fill K; centrality preserves their action on the translated progression nilmanifold. We may average over K starting at each tuple before integrating against \mu. Each translated factor is a function on V of mean \alpha, so the deviation of this average is at most B^{k-2}\alpha(1-\alpha). Taking p\to\infty and then \epsilon\to0 gives the asserted upper bound after division by \alpha^k.

The bounds determine the exponential rate but leave a factor of order k^3 between the guaranteed and maximum allowed shortfalls. Closing that gap would distinguish the cost of visiting these particular lanes from the cost that any construction must pay. The argument also gives no scale for how large the prime must be if the length increases with it.

References

M. Deng, J. Tidor and Y. Zhao. Uniform sets with few progressions via colourings. Mathematical Proceedings of the Cambridge Philosophical Society (2025).

R. Shi and Y. Dong. An improved upper bound for colorings without symmetrically colored k-term arithmetic progressions (2026).

P. Candela and O. Sisask. Convergence results for systems of linear forms on cyclic groups and periodic nilsequences.

B. Green and T. Tao. An arithmetic regularity lemma, an associated counting lemma, and applications.

P. Candela, D. González-Sánchez and B. Szegedy. An inverse theorem for all finite abelian groups via nilmanifolds.