Petty's Notebook
ArticlesPapersnfieldAbout
Get notified when new posts are published. No spam, just math.
Alexander S. Petty  |  ©2009-2026
← Back
boundary

Digit Collisions and the Cubic Law

June 4, 202615 min read
Companion paper: The Cubic Law for Digit-Collision Energy →
Blue and gold streams connect a sawtooth, a residue orbit and a lattice around a luminous central boundary.
The boundary between digit and orbit. The floor creates the sawtooth on one side and the remainder cycle on the other. Both leave signed edges, and the character spectrum reads the flux between them.

In base 3, the two-digit words with matching digits are 00, 11 and 22. Written in ordinary decimal notation, those are 0, 4 and 8. Three points in a row of nine possible states.

Multiply those points by a number that is coprime to 9, wrapping around whenever you reach 9. Then advance each point by that same multiplier. Count how many cross the end of the row. With multiplier 1, one point crosses. With multiplier 2, two points cross.

Repeat this for all six permitted multipliers. The counts form a small carry table. Remove its prescribed means, square the deviations, and add them. The result is the collision energy. At base 3 it is exactly 16/316/316/3.

Now let the base grow through the odd primes. Each base gives a larger finite table. The individual counts fluctuate, but the total squared deviation approaches a definite scale:

Eb=b3+O ⁣(b2(log⁡b)2).E_b=b^3+O\!\left(b^2(\log b)^2\right).Eb​=b3+O(b2(logb)2).

The leading coefficient is 1. The question is where that 1 comes from.

From a count to a square

The centering matters. Multipliers in the same residue class modulo bbb have a common deterministic bias. Removing that class mean measures the variation within the class. It does not assume that the digits are random.

For base 3, the six centered entries are

23,43,23,−23,−43,−23.\frac23,\quad\frac43,\quad\frac23,\quad -\frac23,\quad-\frac43,\quad-\frac23.32​,34​,32​,−32​,−34​,−32​.

Their signs balance, but their squares add. This is how a table whose entries cancel in pairs can still carry energy.

The six centered base-three carry entries, with positive and negative bars paired by reflection and their squared contributions totaling sixteen thirds.
The six centered base-three carry entries, with positive and negative bars paired by reflection and their squared contributions totaling sixteen thirds.

The theorem uses the complete table of unit multipliers modulo b2b^2b2. It does not require one particular long-division orbit to visit every permitted remainder. The prime-base assumption is part of the result.

Dividing the theorem by b3b^3b3 makes its meaning clearer. The ratio Eb/b3E_b/b^3Eb​/b3 tends to 1, and the relative error is bounded by a constant times (log⁡b)2/b(\log b)^2/b(logb)2/b. The finite energy need not equal the cube of the base. At base 3, it plainly does not.

Two coordinates

The floor function produces a sawtooth. Its fractional part rises, crosses an integer, and resets. A Dedekind sum measures the correlation between two such sawtooths on a finite residue grid.

Those sums belong to a well-established theory. Reciprocity relates them at different moduli, and their mean values have been studied independently of digit collisions. Here the carry table supplies a particular average of them.

The connection is exact. Character orthogonality converts the squared spectral coefficients into

Eb=4∑vwb(v)s(v,b2).E_b=4\sum_v w_b(v)s(v,b^2).Eb​=4v∑​wb​(v)s(v,b2).

The weight wb(v)w_b(v)wb​(v) counts how many pairs of entries from the digit window produce the ratio vvv. For example, pairs (1,2)(1,2)(1,2) and (2,4)(2,4)(2,4) produce the same ratio whenever both fit inside the window. The weight records that repetition.

There is a simpler way to keep the count. Sum over the pairs themselves:

Eb=4∑k=1b−1∑u=1b−1s(k−1u mod b2,b2).E_b=4\sum_{k=1}^{b-1}\sum_{u=1}^{b-1} s(k^{-1}u\bmod b^2,b^2).Eb​=4k=1∑b−1​u=1∑b−1​s(k−1umodb2,b2).

Here k−1k^{-1}k−1 means the multiplicative inverse modulo b2b^2b2. Each pair determines one ratio. Every repetition is still present, now as a separate point in a square grid. The multiplicity is absorbed into the parametrization.

That change makes the next step visible. The grid has a diagonal, where k=uk=uk=u. Everything on that diagonal has ratio 1.

One third and two thirds

The diagonal can be evaluated exactly:

Δb=(b−1)(b2−1)(b2−2)3b2=13b3+O(b2).\Delta_b= \frac{(b-1)(b^2-1)(b^2-2)}{3b^2} =\frac13b^3+O(b^2).Δb​=3b2(b−1)(b2−1)(b2−2)​=31​b3+O(b2).

The other pairs come in reflected orientations. The pairs (k,u)(k,u)(k,u) and (u,k)(u,k)(u,k) have reciprocal ratios, and the corresponding Dedekind sums agree. They can be grouped by their common reduced fraction.

The off-diagonal estimate is

Offb=23b3+O ⁣(b2(log⁡b)2).\mathrm{Off}_b=\frac23b^3+ O\!\left(b^2(\log b)^2\right).Offb​=32​b3+O(b2(logb)2).

Thus one third of the leading mass comes from equal coordinates, and two thirds from unequal coordinates. These are limiting proportions as the odd prime base grows. The exact split at a small base can look quite different.

Exact diagonal and off-diagonal collision energies divided by the cube of the prime base, approaching horizontal guides at one third and two thirds.
Exact diagonal and off-diagonal collision energies divided by the cube of the prime base, approaching horizontal guides at one third and two thirds.

The unequal pairs require more work. Rademacher’s three-term reciprocity replaces their Dedekind sums at the large modulus b2b^2b2 with a rational main term and two sums at smaller moduli. After collecting terms, there are four contributions. The main term supplies the leading mass. An elementary correction is of order b2b^2b2. One smaller-modulus contribution cancels exactly by oddness. The remaining contribution needs a bound.

The main term leads to the identity that fixes the constant.

A sum with total mass one

After the common factors have been removed, the required infinite sum is

∑a>k≥1(a,k)=11ka2=1.\sum_{\substack{a>k\ge1\\(a,k)=1}}\frac1{ka^2}=1.a>k≥1(a,k)=1​∑​ka21​=1.

The condition (a,k)=1(a,k)=1(a,k)=1 says that the pair has no common factor. Each reduced pair contributes a positive amount. Their total is exactly one.

There is a short explanation for the normalization. If we first allow all pairs, including pairs with a common factor, a classical Euler identity gives

∑a>k≥11ka2=∑a≥2Ha−1a2=ζ(3),\sum_{a>k\ge1}\frac1{ka^2} =\sum_{a\ge2}\frac{H_{a-1}}{a^2} =\zeta(3),a>k≥1∑​ka21​=a≥2∑​a2Ha−1​​=ζ(3),

where Hn=1+1/2+⋯+1/nH_n=1+1/2+\cdots+1/nHn​=1+1/2+⋯+1/n.

Every pair is a unique common-scale copy of a coprime pair. Multiplying both coordinates by ddd divides its weight by d3d^3d3. Adding all possible scales therefore multiplies the coprime total by ∑d≥1d−3=ζ(3)\sum_{d\ge1}d^{-3}=\zeta(3)∑d≥1​d−3=ζ(3). The unrestricted total and the scale factor are equal. The coprime total must be 1. This is the Euler-sum calculation used in the proof; Flajolet and Salvy develop the classical identities behind it.

A triangle of coprime pair weights beside the partial sums of their positive mass, approaching the exact total one.
A triangle of coprime pair weights beside the partial sums of their positive mass, approaching the exact total one.

The collision geometry determines which series appears. The Euler identity evaluates it. Together they fix the off-diagonal coefficient at 2/32/32/3 and the full cubic coefficient at 1.

There is an exact unit-mass identity here. The finite energy still has its lower-order correction.

The size of the error

The smaller-modulus remainder has a useful symmetry. At each modulus, a complete residue block sums to zero. An incomplete block can leave a remainder, but its size is bounded by the sum of the absolute Dedekind values over one block.

The cotangent formula bounds that absolute sum by a constant times the modulus multiplied by the square of its logarithm. The weights attached to successive blocks decrease. Abel summation uses that decrease to turn the block bound into a bound for the entire weighted slice. Summing the slices gives the stated b2(log⁡b)2b^2(\log b)^2b2(logb)2 error scale.

The proof keeps the exact cancellations before taking absolute values. The estimate then depends on what an incomplete residue block can leave behind.

There is also a loss from the floor in the main term. A reduced pair can occur only an integer number of times in the digit window. Replacing that integer count by a continuous quotient leaves a rounding defect bounded at the same logarithmic-square scale.

An exact base-31 example. Three complete unweighted residue blocks sum to zero; the final two terms sum to three sevenths. Below, whole-copy counts fall beneath the continuous quotient, exposing the rounding gaps.
An exact base-31 example. Three complete unweighted residue blocks sum to zero; the final two terms sum to three sevenths. Below, whole-copy counts fall beneath the continuous quotient, exposing the rounding gaps.

The upper panel shows the cancellation before the repetition weights are applied. Those weights vary along the row, so the complete weighted sum need not vanish. Abel summation controls the cost of that variation. The lower panel shows the separate loss from rounding the number of copies down. The final bound covers both effects, but does not determine their combined secondary coefficient.

The arithmetic scale

The cubic growth has a classical continuous counterpart. Hilberdink, Luca and Tóth evaluate the relevant GCD sum, fixing the leading scale for the continuous sawtooth energy. The finite theorem establishes that this scale persists in the complete prime-square carry table, with its exact centering and diagonal decomposition.

The same finite energy is also a weighted square moment of Dirichlet LLL-values. The carry counts, the Dedekind average, and the character moment are exact descriptions of one quantity. Changing descriptions makes different parts of its structure accessible.

The carry-boundary calculus explains how other digit rules select other boundaries. This cubic law concerns the lag-one collision boundary in odd prime base. Its coefficient comes from the particular short window and coprime weights that boundary supplies.

The complete proof is in The Cubic Law for Digit-Collision Energy.

I began with three points in a row of nine states. Following the same rule through larger bases led to an infinite sum over coprime pairs. Its exact value fixes the leading scale of the finite tables. There is no fitted constant. The coefficient is one because the primitive weights add to one.

That is also why I want to investigate the secondary term. The error bound still contains the floor’s rounding losses and the remainder of a signed sum cut off mid-cycle. Both have an exact finite origin. The cubic law gives me a scale to subtract. I want to know whether the difference has an arithmetic shape of its own.

Companion paper: The Cubic Law for Digit-Collision Energy →
Share

Discussion

Sign in to join the discussion.

← All articlesRead the paper →
← Previous: The Orbit's Edge
Next: The Secondary Term of the Cubic Law →