Still preparing the reader…Long documents can take a little longer to load and typeset.
Correcting a single squared sample allows a digit-collision carry table to recover its continuous mean-square energy with vanishing absolute error, even as the energy itself grows. We prove a quarter-power rate as the prime base increases by controlling the combined contribution of the interior resets. Let off the integers, with at integers, and put . For every , as tends to infinity through odd primes, The sampled readings are an exact permutation of the centered carry table. A weighted identity of Huxley separates the sampled reset mass, the signed interior interaction and curvature. In the prime-square construction the common reset contributes . Grouping Dedekind sums by additive order and counting the linear twists near integer slopes gives the uniform bound for the interior source, which yields the stated rate.
October 10, 2026
Revised November 2, 2026
An integral ignores the value assigned at a single point. A finite arithmetic table retains it. When the table and its associated field grow together, that distinction can survive refinement. For the carry tables considered here, the discrepancy tends to one. Its source is a common reset of all the sawtooth functions representing the table. The main estimate controls the combined contribution of the growing family of interior resets and gives a quarter-power rate of approach.
The sampling problem changes with the base. More clocks and more reset points accompany the finer grid. Fixed-function Riemann-sum convergence therefore does not settle this limit. The issue is whether the entire discrepancy can be made to vanish after the correction, while the energy itself grows.
Define the centered sawtooth, with its midpoint value at integers, by A component will be called a clock. It rises linearly and repeats at period . Its reset is the jump, with the midpoint value retained. The components are added before squaring, so their cross terms contribute to the energy. For positive integers , put (1)
A digit collision means that the selected digit positions agree. The equal-digit words in base occupy the positions , , on a circle of positions. Multiplication and a further step give a count of carries across the join. Subtracting the proportional allowance centers that count. Proposition 1.2 shows that the centered readings are precisely the values of on the grid, in a different order. This correspondence holds for every integer base .
The rate theorem concerns odd prime bases. Put , and . If is the sum of squared centered carry readings, then .
Theorem 1.1 (Unit sampling defect). For every , as tends to infinity through odd primes, (2) Equivalently, the original finite carry energy satisfies (3) The constants depend only on .
Immediately on either side of the periodic join, tends to , whereas its prescribed value at the join is zero. Replacing that single squared sample by raises the grid average by , which tends to one when and . Figure 1 shows this at base five. The theorem proves that the other sampling discrepancies, taken together, tend to zero. It turns the local observation at the common reset into a statement about the complete growing table.

The continuous energy is a classical GCD quadratic form, as recalled in Proposition 1.3. For its unweighted version, Hilberdink, Luca, and Tóth [4, Theorem 5.1] proved . Here is kept exact, so further terms in the continuous energy are separated from the error made in reading it on the finite grid. The sampling-limit question arose in the secondary energy calculation [7].
Huxley’s weighted Farey identity [5, Lemma 3.4] already gives the exact sampling decomposition for arbitrary weights and grids. Theorem 2.1 writes it in the midpoint convention of the carry table and gives a direct proof. The continuous GCD estimate above and this exact identity leave the growing interior interaction to be bounded. The main estimate here is for the signed source in (16), uniformly as the clock count and grid size grow together. It makes the corrected sampling error tend to zero on an absolute scale, so bounded terms in the continuous energy are no longer obscured by sampling.
For this estimate, complete cycles of Dedekind sums cancel when their frequencies are grouped by exact additive order. Reciprocity and Kloosterman completion expose equally spaced linear twists. Counting those near an integer slope gives the required uniform bound. All arguments specific to the carry construction and this estimate are included.
The finite object is defined by its carries, including their endpoint convention. Its clock representation is an identity at every grid point. No limiting argument is needed for that correspondence.
Let be an integer and put . The integers from zero through represent all two-digit base- words, including leading zeros. The equal-digit words form For , define the carry count, centered reading and energy by Each difference of floors is zero or one. It counts whether the step from to crosses an integer, with arrival at the boundary counted as a crossing. A step of crosses the join from exactly of the possible starting positions. The proportional allowance for the selected marks is therefore . This is the centering used in the digit-collision energy [7].
Proposition 1.2 (Carry representation in every base). Writing for the least residue, one has, for every integer , (4)
Proof. Expand each floor into its argument minus its fractional part. The linear terms cancel the centering . Since , substitution of gives two fractional-part sums with indices and . Their difference is The equality includes integer arguments. The multiplier is a unit modulo , with inverse , proving the energy identity. ◻
For example, the equal-digit words in base three occupy positions on a circle of nine positions. Multiplication by two moves them to . A further step of two carries two of the three marks across the join, so and .
The continuous energy has a classical finite arithmetic expression. For a real vector , put Zero weights are permitted. The unweighted profile corresponds to .
The following is the weighted form of Franel’s integral identity, first proved by Landau [1, p. 1534]. Its short Fourier proof also fixes the normalization used in the sampling comparison.
Proposition 1.3 (Classical GCD energy identity). For every real finite vector , (5) In particular, (6) Here denotes the greatest common divisor.
Proof. The nonzero Fourier coefficients of are . The common frequencies of and are the multiples of their least common multiple. Parseval therefore gives Multiply by four and sum with the weights . ◻
Thus the continuous comparison retains every pair of clocks through its gcd overlap. Its relation to the carry table is exact even when the base is composite. Primality will enter the sampling estimate, where it supplies coprimality at all interior reset denominators.
A grid may pass through some resets and miss others. At a sampled reset, the square of the midpoint reading differs from the average of the two one-sided squares. Between grid points, the sign of the sampling error depends on the clocks that continue through the reset. Huxley’s weighted identity [5, Lemma 3.4] keeps both effects, for arbitrary weights and grids. We state it in the carry table’s midpoint convention and prove it directly.
For and an integer , define Here is Euler’s totient, with . The weight is the sum of the clocks resetting at a reduced fraction with denominator . In particular, . The sum is their squared reset mass at the grid points. For the remaining signed interaction put (7) where denotes the reduced residues in . The midpoint reading comes from the clocks that do not reset there. At a reset lying on the grid, .
Theorem 2.1 (Sampling on an arbitrary grid). For every and every real vector , (8) If whenever , then (9)
Proof. Between resets, has slope . At a reduced fraction , write and . Its left and right limits are and . For , (10) The mean of the two one-sided squares is , whereas the prescribed value is . A reduced fraction belongs to the -grid exactly when . There are such fractions in one period, with the origin represented by . Thus the total correction from the Fourier midpoint values to the actual sampled squares is .
Let . Distributional differentiation on the circle gives For each nonzero integer , consequently, Average the Fourier series over the grid, using symmetric Abel limits. Only multiples of remain. The first denominator series is ; the second is . The finite jump sums commute with the limit. After the midpoint correction just described, (11) This argument includes every grid-aligned reset, not only the origin.
Count the derivative jumps clock by clock, including zero. If , the residues , , run through the multiples of , each exactly times. Bernoulli multiplication therefore gives It follows that (12) Insert (10) and (12) into (11), and reverse the sign. The origin has and supplies no term to . This proves (8).
Under the stated coprimality hypothesis, a divisor of divides no active clock frequency. Hence there, and , proving (9). ◻
To match Huxley’s notation, take , and . Möbius inversion returns the clock coefficients . His function gives , where . Pairing with therefore gives His Lemma 3.4 then becomes (8), including composite grids. The direct proof above records the same point-value corrections without changing the clock convention.
The common reset contributes the rank-one form . A mixture with total weight zero removes that term. The interior interaction is a different quadratic form, and need not vanish with it. When the grid shares factors with the active frequencies, the additional terms in record the other sampled resets explicitly.
For the unweighted profile, put Complete periods sum to zero, so for . Thus its interior source is (13)
Corollary 2.2 (Independent clock and grid sizes). For arbitrary positive integers , (14) If for every , this becomes (15)
Proof. Set in Theorem 2.1. Then , , and the formulas follow. ◻
For an odd prime , take , , and write . The specialization needed for the rate is (16) The first term tends to one and the last is . The remaining task is a uniform signed estimate for .
For that estimate we need a second finite expression. Define the Dedekind sum, with the same integer-zero convention, by It is periodic and odd in . This is the classical sawtooth convention [2]. A bar denotes a multiplicative inverse modulo the denominator in use.
Proposition 2.3 (Dedekind representation). If for , then (17) All numerator indices occur, including nonunits.
Proof. Complete periods of sum to zero. Replace the prefix in (13) by . Expand as the number of multiples of through and group the reduced fractions that lie on each larger grid. This gives Since is a unit modulo , change variable to . The inner sum becomes , proving the claim. ◻
The exact identity leaves the total signed interior source to be bounded. The smaller additive periods can be controlled by their absolute mass. At larger periods, two geometric-sum estimates remove the frequency tails, and completion treats the remaining frequency box. Its bound depends on how many completed phases have derivative close to an integer. Keeping that count allows every inverse frequency to remain in the sum.
Throughout, a bar denotes a modular inverse at the indicated modulus, is the Möbius function and counts positive divisors.
A frequency on a residue grid may repeat a pattern from a smaller grid. Its exact additive order is the denominator after that frequency has been reduced; we call this order its conductor. Grouping by conductor combines the same pattern wherever it occurs. The decomposition uses finite Fourier inversion and divisor Möbius inversion. Here the numerator endpoint is shared by all those copies, so complete cycles disappear before an estimate is applied.
Write and define for , with value zero for . The conductor kernel will be denoted by , to distinguish it from the carry count .
Lemma 3.1 (Exact-order kernel). For every integer and every integer , (18) where . Consequently, (19) The kernel is odd in and has zero sum over a complete period.
Proof. The finite Fourier transform of the integer-zero sawtooth is It follows by differentiating the finite geometric sum, or directly by summing at a nontrivial -th root of unity. Fourier inversion in one factor of gives This computation permits nonunit . Group the terms according to , writing with . The resulting sum is (19) with the cotangent kernel in (18). Divisor Möbius inversion gives its first expression. Oddness follows from the sawtooth definition. For each unit , multiplication by permutes the residues, whose odd cotangent sum is zero. This proves the complete-period assertion. ◻
Assume throughout this section that for . Put and .
Proposition 3.2 (Full lift weight). The entire interior source is (20)
Proof. Insert (19) into (17) and write each original modulus as . Its factor is . The numerator sum is through the same for every lift. Complete periods of cancel, leaving the prefix . Summing over gives . Every sum is finite and every original modulus is retained. ◻
For a residue modulo , represented in , define This signed pair of endpoint indicators is odd. It records the prefix and its reflection together, including equality at either endpoint.
Proposition 3.3 (Complete frequency expressions). For , , put (21) Then (22) Completing the endpoint frequency gives (23) Only is restricted to units. All nonunit and are included.
Proof. Oddness replaces twice the prefix in (20) by a full period weighted by . Insert the cotangent expression (18) and change variable to . This gives the double sum over all nonzero , with factor . Each of the four sign choices has the same product. Restricting to therefore gives (23). The zero and half-period cotangent terms vanish.
The normalized finite Fourier coefficients of the endpoint indicator are and its mean is zero. Pairing with in Fourier inversion introduces times the corresponding sine factor. The half-period coefficient, when present, is zero. Finally , so the two signs cancel in the product of sines. This proves (22), with the literal endpoints and . ◻
The triple expression permits cancellation in one frequency at a time. The completed expression retains their joint signed response. Both describe the same finite source.
The identities above allow independent clock and grid sizes. For the rate estimate, from here onward let be an odd prime, and . Write and , and put . Complete cycles have already cancelled in the conductor assembly. The smaller conductors can now be bounded in absolute value, leaving the cancellation argument for the larger ones.
The elementary inequality for gives Since each permutes the residues, (18) implies Oddness makes the total positive and negative masses equal. Any prefix, including one permuted by , is therefore bounded by half the total absolute mass. Put . Multiplying by and summing through gives (24) This includes every frequency at those conductors.
The actual square carrier prevents a determinant from being zero. This lets us sum possible moduli as divisors after geometric cancellation has been used in the linear frequency. The estimate includes composite moduli and nonunit linear frequencies.
Write , so that for every .
Lemma 3.4 (Nonzero determinant count). Let . For every , , let be the centered residue of . Then if , and For fixed there are at most possible . Also, for , (25)
Proof. The congruence follows from . Since and are units, zero would imply , impossible for . Also while , proving the strict lower bound. The upper bound follows from . The last estimate follows by splitting at , or by the harmonic sum. No zero determinant is charged as a divisor. ◻
Proposition 3.5 (The tail). For , the part of (22) with has magnitude . The same bound holds if or is restricted to any initial interval, and if the moduli are restricted to any subset.
Proof. Split into dyadic intervals of scale . For fixed , the coefficient outside has magnitude . On the retained interval the cotangent is positive decreasing, with sup norm plus variation . The geometric-sum estimate and summation by parts therefore give The cutoff is just a partial interval. Sum this bound over , after replacing by . Reverse the positive sum over and and apply Lemma 3.4 with . Each fixed has at most moduli. Thus the block cost is at most The dyadic sum of is , proving the proposition. ◻
The endpoint multiplier oscillates with . It must be expanded into its three linked phases before geometric cancellation is applied. The two shifted phases have half-integer centered residues and retain the literal asymmetric endpoints and .
Proposition 3.6 (The tail). For , the part of (22) with has magnitude . The same estimate holds after initial-interval restrictions on and arbitrary modulus selection.
Proof. The product-to-sum identity gives the amplitudes On a dyadic interval of scale , the positive cotangent and cosecant factors decrease. Their sup norms plus variations in are . The phases are , with Let be the centered residue of modulo . It is nonzero. For this follows from , and for it is odd. The geometric bound for a block is up to an absolute constant. For fixed , every contributing modulus satisfies (26) Moreover . Here , , so . The upper bound follows from . Each such modulus is a divisor of this fixed nonzero integer. Sum over , use the harmonic bound corresponding to (25), and sum and . The resulting block cost is . Summing the dyadic blocks proves the claim. All three phases were included. ◻
Reciprocity puts the inverse phase on the frequency modulus . Completion introduces equally spaced linear twists. Counting those whose derivatives approach an integer lets us sum every inverse frequency.
The twists away from integer slopes admit the first-derivative estimate. Only the remaining twists need the second-derivative estimate.
For a compact interval , put Here the distance is the usual distance on the circle, or equivalently the infimum of ordinary distances to all integer translates.
Lemma 3.7 (Grid distances). If is an integer and has length , then (27)
Proof. Enlarge the arc by at either end. If this covers the circle, the first bound is immediate. Otherwise an arc of length contains at most grid points, with one additional point allowed to cover every endpoint convention.
Outside the enlarged arc, group distances into , . Each group lies in at most two arcs of length , one at each end of . Allowing both boundary points gives at most four grid points per group. Distances on the circle are at most , so summing through proves the bound. ◻
We use two classical derivative estimates. If a real phase has monotone derivative a distance at least from the integers, its exponential sum is . If on an interval containing consecutive integers, the sum is . See Montgomery and Vaughan [6, Corollary 16.6 and Theorem 16.7]. The estimates include arbitrary subintervals. A negative second derivative is handled by complex conjugation.
Lemma 3.8 (Sum of linear twists). Let contain consecutive integers, taking to be its first and last integers. Suppose is twice continuously differentiable and on , where . Then, for every integer , (28) The same conclusion holds for negative second derivative with the corresponding absolute bounds.
Proof. The case follows from the last term. Otherwise let , so If , apply the second-derivative bound to all twists. Its contribution is at most , giving (28).
Suppose and take . For the modes with , apply the second-derivative bound. Their contributions total at most . By Lemma 3.7, their other contributions total at most For every remaining mode the derivative stays between two consecutive integers, at distance at least . The first-derivative estimate and (27) give for their sum. This proves the claim. Conjugation and reindexing prove the negative case. All estimates are uniform on subintervals. ◻
Proposition 3.9 (Completed reciprocal phase). Let , , and assume the hypotheses of Lemma 3.8. Then, for every , (29) For interpret the periodic factor as one. The same bound holds.
Proof. The function is periodic modulo . Its normalized Fourier coefficients are The classical complete Kloosterman estimate gives, for every , For positive numerator indices this is the bound stated by Bettin and Chandee [3, author preprint, p. 1]. Periodicity covers every nonzero residue. If one index is zero, the sum is a Ramanujan sum with magnitude at most the gcd of the other index and , which satisfies the same bound. If both are zero, . Thus the estimate also includes zero modes and composite moduli. Fourier inversion is exact on the whole conductor interval, even across many periods. Apply Lemma 3.8 to its linear twists and multiply by this uniform coefficient bound. For , use the sole Fourier coefficient one, or apply the derivative estimates directly. ◻
The slope count can be applied to a whole quotient band. Its first two costs have a reciprocal inverse-frequency weight, so all inverse frequencies can now be summed without introducing a separate cutoff.
Put and . For fixed , let denote the sum of over the integers where is any interval. Empty ranges contribute zero.
Lemma 3.10 (Band estimate from slope separation). For and every admissible , (30) The estimate is uniform in the interval and in all half-range cuts.
Proof. The exact product-to-sum expansion has amplitudes and sine phases , where and . Inverse reciprocity gives the exact identity (31) For the first factor on the right is one. Since and , all three coefficients obey .
Set . The interval lies in and . For , take , so and (32) The number of consecutive integers in any permitted conductor interval is at most . Indeed implies , so the extra endpoint is absorbed. All constants are absolute for sufficiently large . The finitely many smaller primes are harmless.
Proposition 3.9, including its uniform subinterval form, therefore bounds the phase sum by (33) Here gives , and divisor and logarithmic factors are absorbed into .
Each absolute amplitude is increasing on the permitted range. This follows from the increasing factors , , and . Its supremum plus variation on any retained interval is . Partial summation with (33), followed by summing the three original phases, proves (30). ◻
Proposition 3.11 (Full inverse-frequency box). For , the part of the exact source with , , , and every permitted inverse frequency has magnitude (34) The same bound holds with an additional interval restriction on and on the conductors within each quotient band.
Proof. For and , divisor expansion gives (35) Indeed . Write and use the harmonic sum and . The divisor factor is at most , hence for .
Sum (30) in , and then in , retaining the original harmonic lift . The first term costs using and the analogous bound for . The second term costs because and converge. The third costs Since the last sum is , reducing preliminary epsilons absorbs these logarithms. Convergence of the two other harmonic-lift sums follows from . Initial frequency restrictions, nonunit products, partial intervals and the full contribution have all been included. Positive majorants also permit the stated additional interval restrictions. ◻
The full source now has four parts: the small conductors, two frequency tails, and a frequency box containing every inverse frequency. Their bounds have only two cutoffs left to choose.
Table 1 records the disjoint ranges. Here and . Every permitted inverse frequency is retained in every row. A common factor absorbs divisor factors and fixed powers of logarithms.
Table 1. Ranges and bounds for the interior source.
Theorem 4.1 (Complete frequency bound). Uniformly for and every , (36) Consequently, (37)
Proof. Retain all frequencies at and use (24). At larger , partition the remaining triples into ; then ; and . Every inverse frequency remains in each part. Propositions 3.5 and 3.6 apply with exactly these interval restrictions. Proposition 3.11 bounds the last part. There are no overlaps or omitted ranges. Choosing preliminary epsilons smaller absorbs divisor factors and fixed powers of logarithms, proving (36).
Take . The box and both tails have order , and the small-conductor cost is smaller. The ceilings change only absolute constants. The finitely many smaller primes are absorbed into the constant. This proves (37). ◻
Proof of Theorem 1.1. Equation (16) gives Apply Theorem 4.1. The latter three terms are , smaller than the asserted error. Multiplication by gives (3). ◻
The exponent describes the limiting rate. No numerical error constant at a specified prime is asserted. The estimate controls the complete signed source at , including all original moduli and both endpoints.
The boundary correction follows from the assigned carry values. In particular, (38) Huxley’s weighted identity identifies the sampled point contribution. The quarter-power estimate controls the remaining interaction as both the field and the grid grow.
Conjecture 4.2 (Square-root sampling rate). For every , as through odd primes.
By (16), this is equivalent to (39) The three principal allowances in (36) satisfy Their maximum is at least , attained by . Thus changing these two cutoffs alone cannot improve the quarter-power rate. Further progress requires a stronger estimate for the signed source. The optimization limit of the present upper bounds places no lower bound on that source.
The proved estimate makes the corrected finite energy agree with the continuous energy to within an error tending to zero. This is stronger than agreement of leading terms because sampling no longer obscures even a bounded term in the energy. The exact carry correspondence and uniform control of the interior interaction together give that precision.
[1] C. Aistleitner, I. Berkes, and K. Seip, GCD sums from Poisson integrals and systems of dilated functions, J. Eur. Math. Soc. 17 (2015), no. 6, 1517–1546, https://doi.org/10.4171/JEMS/537.
[2] M. Beck, Dedekind cotangent sums, Acta Arith. 109 (2003), no. 2, 109–130, https://doi.org/10.4064/aa109-2-1.
[3] S. Bettin and V. Chandee, Trilinear forms with Kloosterman fractions, Adv. Math. 328 (2018), 1234–1262, https://doi.org/10.1016/j.aim.2018.01.026. Author preprint: https://arxiv.org/abs/1502.00769.
[4] T. Hilberdink, F. Luca, and L. Tóth, On certain sums concerning the gcd’s and lcm’s of positive integers, Int. J. Number Theory 16 (2020), no. 1, 77–90, https://doi.org/10.1142/S1793042120500049.
[5] M. N. Huxley, Identities involving Farey fractions, Proc. Steklov Inst. Math. 276 (2012), no. 1, 125–139, https://doi.org/10.1134/S0081543812010105.
[6] H. L. Montgomery and R. C. Vaughan, Multiplicative Number Theory II: Primes and Sieves, online manuscript, chap. 16, https://personal.science.psu.edu/rcv4/Vol2/Vol2.pdf.
[7] A. S. Petty, The Secondary Term in Digit-Collision Energy, preprint, 2026, https://doi.org/10.5281/zenodo.21875096.
Virginia, USA
Discussion
Sign in to join the discussion.