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

The Secondary Term of the Cubic Law

July 1, 202612 min read
Companion paper: The Secondary Term in Digit-Collision Energy →
Blue and gold arcs and rows of points converge at a bright point on a horizontal axis against a dark background.
The leading correction survives the passage from a continuous average to the finite digit table.

The cubic law established the leading growth of digit-collision energy. In an odd prime base ppp, the leading term is p3p^3p3. This paper identifies the first correction beneath it.

Ep=p3−1π2p2(log⁡p)2+⋯E_p = p^3 - \frac{1}{\pi^2} p^2 (\log p)^2 + \cdotsEp​=p3−π21​p2(logp)2+⋯

The omitted terms are smaller than the correction shown as ppp grows through the odd primes. All logarithms here are natural.

There is no circle in the original count. There are integer remainders, digit bins, and the floor function that governs long division. Yet the first correction carries 1/π21/\pi^21/π2.

That constant enters through coprimality, the arithmetic of pairs that share no common factor. Finding it in a continuous average is one part of the result. The other is proving that the finite digit table preserves the same coefficient. The averaging helps expose the correction; the sampling theorem establishes that it belongs to the original integer count.

The table beneath the count

The continuous average in the proof reduces to a finite square table of rational weights. Put the integers from 1 through NNN along both sides. In each cell, divide the greatest common divisor of the two labels by their least common multiple.

1 2 3 4
1 111 1/21/21/2 1/31/31/3 1/41/41/4
2 1/21/21/2 111 1/61/61/6 1/21/21/2
3 1/31/31/3 1/61/61/6 111 1/121/121/12
4 1/41/41/4 1/21/21/2 1/121/121/12 111

The diagonal is all ones. Away from it, the weights remember the ratio between the two integers after their common factor has been removed. Call the sum A(N)A(N)A(N). At N=4N = 4N=4, the sixteen entries add to 23/323/323/3.

There are N2N^2N2 cells, but their total grows only like 3N3N3N. Hilberdink, Luca, and Tóth proved A(N)=3N+O((log⁡N)2)A(N) = 3N + O((\log N)^2)A(N)=3N+O((logN)2). That leaves room for a correction as large as the square of a logarithm, but does not say what its coefficient is.

The calculation here gives

A(N)=3N−3π2(log⁡N)2+O((log⁡N)5/3).A(N) = 3N - \frac{3}{\pi^2}(\log N)^2 + O\bigl((\log N)^{5/3}\bigr).A(N)=3N−π23​(logN)2+O((logN)5/3).

The exponent 5/35/35/3 is smaller than two, so the remaining error cannot absorb the displayed correction. The deficit below 3N3N3N grows asymptotically like a squared logarithm, with coefficient 3/π23/\pi^23/π2.

The sieve inside the rounding

Take the pair (2,3)(2, 3)(2,3). It can be scaled to (4,6)(4,6)(4,6), (6,9)(6,9)(6,9), (8,12)(8,12)(8,12), and so on. Each copy carries weight 1/61/61/6. In a table of size N=10N = 10N=10, three copies fit. The fourth does not.

Ten divided by three is 3133\frac{1}{3}331​. Replacing the whole-number count by that quotient adds a third of a copy. At weight 1/61/61/6, the overcount is 1/181/181/18.

A 10-by-10 lattice contains the scaled pairs (2,3), (4,6), and (6,9), each of weight 1/6. The next pair, (8,12), lies outside. The smooth count 10/3 adds an extra third of a copy, contributing 1/18.
Three copies of this ratio fit inside the table. The smooth count includes an extra third.

Every reduced pair has a corresponding fraction. This paper keeps track of all of them. Together they build the correction.

For a fixed larger coordinate kkk, the smaller coprime coordinates supply a harmonic sum, roughly logarithmic in kkk. There is also a factor 1/k1/k1/k. Adding those weighted logarithms through NNN produces a squared logarithm. The fractional parts contribute a weighted average of one half, with smaller indices counting more heavily. Saffari and Vaughan’s theorem controls how these weighted fractions fill the unit interval. It makes the average of one half precise, with an error smaller than the squared logarithm.

Removing common factors by Möbius inversion introduces 1/ζ(2)=6/π21/\zeta(2) = 6/\pi^21/ζ(2)=6/π2. Among pairs chosen independently from 1 through NNN, the proportion with no common factor tends to 6/π26/\pi^26/π2 as NNN grows. In this proof the same factor arises in an exact inclusion-and-exclusion sum. It weights the fractional remainders that build the correction. That is the source of π2\pi^2π2 here.

Together with the two sides of the square, the coefficients combine as

2×12×12×6π2=3π2.2 \times \frac{1}{2} \times \frac{1}{2} \times \frac{6}{\pi^2} = \frac{3}{\pi^2}.2×21​×21​×π26​=π23​.

One half is the average fractional part. The other comes from summing (log⁡k)/k(\log k)/k(logk)/k. The 6/π26/\pi^26/π2 is the coprime filter. The 2 counts both sides of the diagonal. In the first example, rounding 3133\frac{1}{3}331​ down to 3 removed weight from the approximation. That is where the minus sign enters.

A 40-by-40 integer grid marks its 979 coprime pairs in gold, a proportion of 61.19 percent. The limiting proportion is 6 over pi squared, about 60.79 percent. Four labeled factors combine to give the table coefficient 3 over pi squared.
The common-factor filter leaves a pattern in the integer grid. Its limiting density supplies the same factor that enters the proof through Möbius inversion.

The digit table

I reached the square table through digit collisions. In base 5, the two-digit words with matching digits are

00   11   22   33   44

Among the twenty-five possible words, they sit at positions 0,6,12,18,240, 6, 12, 18, 240,6,12,18,24. Five cells on the collision diagonal. The floor function records integer crossings through these cells. Subtract the uniform bulk contribution from each carry count, square the resulting responses, and sum over the twenty-five residues. This square mass is the collision energy E5=48E_5 = 48E5​=48.

The collision energy and the square table are connected by an exact identity. Rewrite the floor counts as centered sawteeth and reorder the residues; the reordering preserves the energy. With N=p−1N=p-1N=p−1, averaging the squared response over the whole interval gives one third of A(N)A(N)A(N). Average over the p2p^2p2 grid points, and you get Ep/p2E_p/p^2Ep​/p2. Their difference is the sampling defect SpS_pSp​.

Epp2=A(p−1)3−Sp.\frac{E_p}{p^2} = \frac{A(p-1)}{3} - S_p.p2Ep​​=3A(p−1)​−Sp​.

At base 5, the continuous average is 23/923/923/9. The grid average is 48/2548/2548/25. Their difference is 143/225143/225143/225.

The exact squared base-five response is drawn in blue, with its 25 grid samples in gold. The interval average is 23/9 and the grid average is 48/25. Their difference is 143/225, about 0.636.
The finite grid sees only the gold samples. The gap between these two averages is the quantity the sampling theorem must control.

The continuous calculation found the coefficient. The question is whether the finite grid preserves it.

The grid preserves it

Increasing the prime makes the grid finer. It also changes the function being sampled. More sawteeth enter the response, more jumps appear between grid points. A finer mesh on a fixed curve would be a simpler problem. Here both the mesh and the curve are moving. If the sampling defect grew like (log⁡p)2(\log p)^2(logp)2, it could contribute at the same scale as the correction and change the coefficient. The proof must control that discrepancy before the continuous coefficient can be claimed for the digit table.

A fixed interior interval of the squared response at bases 5, 11, and 31, with the same vertical normalization. Blue curves gain more structure as the gold sampling grids grow from 25 to 121 to 961 points.
More grid points arrive with more structure to resolve. Each row shows the same window, with squared response divided by (p−1)2(p-1)^2(p−1)2. The breakpoint counts refer to the full unit interval.

The paper proves

Sp=O ⁣((log⁡(2p))2log⁡log⁡(3p)).S_p = O\!\left(\frac{(\log(2p))^2}{\log\log(3p)}\right).Sp​=O(loglog(3p)(log(2p))2​).

The log⁡log⁡\log\logloglog denominator grows slowly, but it grows without bound. The defect is asymptotically smaller than the correction scale. Two exact descriptions of the defect make the proof work. One follows the jumps of the response curve and their positions relative to the sample points. The other uses Dedekind sums and Rademacher reciprocity to express the same discrepancy through smaller moduli. Opening those smaller sums into centered inverse-residue series, and applying Korolev’s incomplete-sum estimate, supplies the strict saving. The divisor factors introduced by the descent have bounded average. That bounded average preserves the saving when all the smaller moduli are added back together.

The finite collision energy therefore has the expansion

Ep=p3−1π2p2(log⁡p)2+O ⁣(p2(log⁡(2p))2log⁡log⁡(3p)).E_p = p^3 - \frac{1}{\pi^2} p^2 (\log p)^2 + O\!\left(\frac{p^2(\log(2p))^2}{\log\log(3p)}\right).Ep​=p3−π21​p2(logp)2+O(loglog(3p)p2(log(2p))2​).

The coefficient −1/π2-1/\pi^2−1/π2 survives. The continuous average determines it, and the sampling estimate carries it back to the finite digit energy. The two averages differ, but their difference is too small to change this term.

Below the correction

The computed sampling defect is smaller than the theorem requires.

Prime base ppp Sampling defect SpS_pSp​
31 0.951
101 1.027
401 1.011
4001 1.000
10007 1.009

The values move around one. The exact decomposition contains an endpoint contribution (p−1)2/p2(p-1)^2/p^2(p−1)2/p2, which tends to one, together with a signed residual and an explicit smaller correction. Proving that the residual vanishes would settle the limit Sp→1S_p \to 1Sp​→1. That limit remains open. So do the stronger bounds O(log⁡p)O(\log p)O(logp) and O(1)O(1)O(1).

The secondary coefficient is proved. Those questions concern the finer arithmetic beneath it.

The same floor operation that produces the digits also rounds the number of copies of each ratio. Those small losses accumulate. Coprimality fixes their coefficient, and the sampling theorem shows that the finite digit table retains it.

The cubic law gave the scale of the energy. The secondary term resolves the first departure from it. What had been left inside an error bound now has a coefficient and a reason.

Companion paper: The Secondary Term in Digit-Collision Energy →
Share

Discussion

Sign in to join the discussion.

← All articlesRead the paper →
← Previous: Digit Collisions and the Cubic Law
Next: Magnitude Decorrelation in the Collision Spectrum →