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

The Centered Collision Sum

October 6, 202316 min read
Companion paper: The Centered Collision Sum →
The Centered Collision Sum
The drift belongs to the family means. Centering leaves the variation within each family.

Take the primes 100910091009 and 110911091109. Both end in 090909.

Write all the fractions between zero and one for each denominator. Compare the first and third decimal places of every row. A beginning such as 0.171…0.171\ldots0.171… counts as a collision. A beginning such as 0.173…0.173\ldots0.173… does not. The middle digit is free.

At 100910091009, there are 108108108 collisions. At 110911091109, there are 100100100. Subtract the smaller digit-bin size from each count.

Prime Collisions Bin size Difference
1009 108 100 +8
1109 100 110 −10

The same final two digits. Opposite signs.

Two ten-by-ten grids locate all lag-two matching fractions at 1009 and 1109. The first has eight cells with two points and 92 with one. The second has one point in every cell. Two ten-by-ten grids locate all lag-two matching fractions at 1009 and 1109. The first has eight cells with two points and 92 with one. The second has one point in every cell.
A row fixes the first and third digits; a column supplies the middle digit. The dot locates a fraction within that matching thousandth. At 1009, eight cells hold a second fraction. At 1109, every cell holds exactly one. The displayed subtraction removes the smaller bin size.

At lag one, the last two digits determine this reduced count. At lag two, we need three. The addresses are 009009009 and 109109109, and they occupy different places in a larger table.

Their shared last digit also puts them in the same family. That family has an exact mean. Subtract it from both entries and their eighteen-point difference survives untouched.

The Collision Fluctuation Sum removes one global drift. Here each family loses its own bias. The subtraction does more than balance the columns. It rules out whole patterns of variation, leaving the differences within a family a restricted set of ways to express themselves.

One more digit

Keep the denominator ppp coprime to the base bbb. Call the collision count C(p)C(p)C(p) and the smaller bin size Q=⌊(p−1)/b⌋Q=\lfloor(p-1)/b\rfloorQ=⌊(p−1)/b⌋. Their difference is

S(p)=C(p)−Q.S(p)=C(p)-Q.S(p)=C(p)−Q.

The base and lag are fixed while we vary ppp.

Lag Places compared Decimal address
1 First and second Last two digits
2 First and third Last three digits
3 First and fourth Last four digits

At lag ℓ\ellℓ, the table modulus is q=bℓ+1q=b^{\ell+1}q=bℓ+1. Once p>qp>qp>q, the remainder of ppp on division by qqq determines S(p)S(p)S(p) exactly. Primality is not needed for this finite statement. A composite denominator coprime to the base reads the same table.

The hundred cells in the opening figure explain why. Each cell is a matching three-digit beginning, an interval of width 1/10001/10001/1000 between zero and one. Increase the denominator by one thousand. Each interval gains one fraction. The collision count rises by one hundred, and so does the smaller bin size. Their difference stays put.

The excluded endpoints require a little bookkeeping. They do not disturb the cancellation.

The exact count behind the cells

Let G\mathcal GG contain the integers nnn from 000 through q−1q-1q−1 whose first and last base-bbb digits agree, allowing leading zeros. There are bℓb^\ellbℓ such integers. The floor contribution from interval nnn is

Bn(t)=⌊(n+1)tq⌋−⌊ntq⌋.B_n(t)=\left\lfloor\frac{(n+1)t}{q}\right\rfloor -\left\lfloor\frac{nt}{q}\right\rfloor.Bn​(t)=⌊q(n+1)t​⌋−⌊qnt​⌋.

Summing the matching intervals gives

C(p)=−1+∑n∈GBn(p).C(p)=-1+\sum_{n\in\mathcal G}B_n(p).C(p)=−1+n∈G∑​Bn​(p).

The minus one removes the endpoint contribution. Coprimality prevents an interior fraction from lying on an interval boundary.

Replacing ppp by p+qp+qp+q adds one to every summand. Both CCC and QQQ rise by bℓb^\ellbℓ, proving the periodicity of SSS. For an allowed address aaa, the table entry is

T(a)=−1−⌊ab⌋+∑n∈GBn(a).T(a)=-1-\left\lfloor\frac ab\right\rfloor +\sum_{n\in\mathcal G}B_n(a).T(a)=−1−⌊ba​⌋+n∈G∑​Bn​(a).

Thus S(p)=T(p mod q)S(p)=T(p\bmod q)S(p)=T(pmodq) in the stated range. The count includes every numerator from 111 through p−1p-1p−1, even when ppp is composite.

The address grows with the distance between the digits. It does not grow with the primes that read it.

Move the whole column

Return to decimal lag one. The forty allowed two-digit endings fall into four columns, according to their final digit. The forty-entry table gives their means directly.

Last digit Mean of the ten entries
1 −17/10-17/10−17/10
3 −9/10-9/10−9/10
7 −1/10-1/10−1/10
9 +7/10+7/10+7/10

No prime sampling enters this calculation. These are averages of four finite lists.

All forty entries together have mean −1/2-1/2−1/2. Adding 1/21/21/2 everywhere balances the table, but leaves the four columns with different biases. Subtracting each column’s own mean balances all four.

These means belong to S=C−QS=C-QS=C−Q. The constructive-mean deviation Δ\DeltaΔ uses a slightly larger benchmark. Its global drift is −9/10-9/10−9/10, not −1/2-1/2−1/2. We are centering the integer table here, before that additional bin correction.

Base three puts the whole operation within reach of six numbers. At lag one the addresses are 1,2,4,5,7,81,2,4,5,7,81,2,4,5,7,8. Group them by their remainder modulo three.

Address Raw entry Centered entry
1 0 2/32/32/3
4 0 2/32/32/3
7 −2 −4/3-4/3−4/3
2 1 4/34/34/3
5 −1 −2/3-2/3−2/3
8 −1 −2/3-2/3−2/3

Every point in the first family moves up by two thirds. Every point in the second moves up by one third. Both families now sum to zero. No distance between members of the same family changes.

Six connected pairs of points show base-three family centering. The family at addresses 1, 4 and 7 moves up two thirds; the family at 2, 5 and 8 moves up one third. Six connected pairs of points show base-three family centering. The family at addresses 1, 4 and 7 moves up two thirds; the family at 2, 5 and 8 moves up one third.
Open circles are the raw entries. Filled circles are the centered entries. The dashed line is the old family mean. Every point within a panel rises the same distance, bringing its mean to zero without changing the differences between its entries.

Pair the addresses around nine. The centered entries at 111 and 888 are opposites. So are those at 222 and 777, and those at 444 and 555.

These are the two balances we need. Every family sums to zero. Reflection changes the sign.

The two balances in any base and lag

For an allowed last digit uuu, average the bℓb^\ellbℓ entries with a≡u(modb)a\equiv u\pmod ba≡u(modb). Write that mean as μ(u)\mu(u)μ(u) and the centered entry as

T∘(a)=T(a)−μ(a mod b).T^\circ(a)=T(a)-\mu(a\bmod b).T∘(a)=T(a)−μ(amodb).

The raw reflection law is T(a)+T(q−a)=−1T(a)+T(q-a)=-1T(a)+T(q−a)=−1. It also gives μ(u)+μ(b−u)=−1\mu(u)+\mu(b-u)=-1μ(u)+μ(b−u)=−1. Subtracting these equalities yields

T∘(q−a)=−T∘(a).T^\circ(q-a)=-T^\circ(a).T∘(q−a)=−T∘(a).

The family sums vanish by construction. These statements hold for every base and positive lag, not just prime bases.

For a prime base at lag one, summing the floor counts gives the shorter formula μ(u)=u/b−1\mu(u)=u/b-1μ(u)=u/b−1. In base seven the means run from −6/7-6/7−6/7 to −1/7-1/7−1/7. Composite bases need not follow that spacing. The decimal means above do not.

Weights that hear nothing

Read the centered table with a pattern of weights. Multiply each entry by its weight, then add.

Give every entry in a family the same weight. The answer is zero. Each family already sums to zero.

Now use weights that agree at reflected addresses. Again the answer is zero. Opposite entries cancel in pairs.

Dirichlet characters supply a complete set of arithmetic weighting patterns. Their weights respect multiplication. An even character agrees at aaa and q−aq-aq−a. An odd character changes sign there.

Only odd characters that also vary within a family can have a nonzero coefficient in the centered table. That restriction is the spectral gate.

At modulus nine, repeatedly multiplying by two puts the six addresses in the order

1, 2, 4, 8, 7, 5.1,\ 2,\ 4,\ 8,\ 7,\ 5.1, 2, 4, 8, 7, 5.

The six characters are the six Fourier modes around this cycle. Mode zero gives every address the same weight. Mode three gives +1+1+1 to the family ending in one and −1-1−1 to the family ending in two. Neither can read the differences inside a family.

Three hexagons show character weights at modes zero, one and three. Below them, three power spectra show global centering removing mode zero, then family centering removing mode three. Modes one and five retain power four ninths. Three hexagons show character weights at modes zero, one and three. Below them, three power spectra show global centering removing mode zero, then family centering removing mode three. Modes one and five retain power four ninths.
Numbers around each hexagon are addresses, in multiplication-by-two order. Arrows give character weights in the complex plane. The bars use coefficients normalized by six, then squared. The constant pattern and the two-family sign pattern disappear; the two surviving powers stay exactly four ninths.

Removing the global mean kills mode zero. Removing the family means also kills mode three. Modes one and five remain, each with power 4/94/94/9. They turn their weights inside the columns, where the entries still differ.

Eighteen places. Seventeen occupied.

Decimal lag one has forty characters modulo one hundred. Twenty are even, so reflection excludes them.

Four characters read only the final digit. Two are already among the even characters. Family centering excludes the other two. That leaves

40−20−2=1840-20-2=1840−20−2=18

permitted characters.

Permitted is not the same as present. Exact evaluation of this forty-entry table leaves seventeen nonzero coefficients. The eighteenth character reads an odd address as +1+1+1 if it is 111 modulo four, and −1-1−1 if it is 333 modulo four. It passes both tests. Its coefficient is nevertheless zero.

Forty character cells contain twenty crosses, two struck-out squares, seventeen gold dots and one purple ring. A lower stem plot separates the centered decimal entries by remainder modulo four; each color sums to zero. Forty character cells contain twenty crosses, two struck-out squares, seventeen gold dots and one purple ring. A lower stem plot separates the centered decimal entries by remainder modulo four; each color sums to zero.
Crosses mark even characters. The two teal squares mark additional odd characters inherited from the last digit. Larger gold dots indicate greater coefficient power. The purple ring is allowed by the gate but has zero coefficient. Its weights subtract the gold total in the lower plot from the teal total. Both are zero.

The gate tells us where a coefficient may occur. The entries decide whether it does.

These are the four weighting patterns from The Character Structure of the Collision Fluctuation. There they combine running sums of Δ\DeltaΔ over primes. Here they read the finite table of SSS, each repeating one weight down a whole family. Center the families and all four table coefficients vanish. The prime-weighted sums need not vanish with them. At a finite cutoff, the addresses carry different total prime weights.

Check all forty characters, including the empty place

Modulo twenty-five, every unit is a power of two. Write a≡2t(mod25)a\equiv2^t\pmod{25}a≡2t(mod25), and put s=0s=0s=0 for a≡1(mod4)a\equiv1\pmod4a≡1(mod4), s=1s=1s=1 for a≡3(mod4)a\equiv3\pmod4a≡3(mod4). The forty characters are

χε,j(a)=(−1)εse2πijt/20,\chi_{\varepsilon,j}(a)=(-1)^{\varepsilon s} e^{2\pi ijt/20},χε,j​(a)=(−1)εse2πijt/20,

with ε=0,1\varepsilon=0,1ε=0,1 and j=0,…,19j=0,\ldots,19j=0,…,19. These are the labels in the figure. A character is odd when ε+j\varepsilon+jε+j is odd. It reads only the last decimal digit when ε=0\varepsilon=0ε=0 and jjj is a multiple of five.

The normalized coefficient is

T^∘(χ)=140∑a∈(Z/100Z)×T∘(a)χ(a)‾.\widehat T^\circ(\chi)=\frac1{40} \sum_{a\in(\mathbb Z/100\mathbb Z)^\times} T^\circ(a)\overline{\chi(a)}.T∘(χ)=401​a∈(Z/100Z)×∑​T∘(a)χ(a)​.

The empty permitted place is (ε,j)=(1,0)(\varepsilon,j)=(1,0)(ε,j)=(1,0), the character modulo four. The twenty centered entries with a≡1(mod4)a\equiv1\pmod4a≡1(mod4) sum to zero. The other twenty sum to zero too. Its weighted total is their difference.

For completeness, group the permitted characters by their conductor, the smallest modulus needed to specify their weights.

Conductor Permitted Nonzero
4 1 0
20 1 1
25 8 8
100 8 8

The gate means “not inherited from modulus ten,” not simply “conductor greater than ten.” The character modulo four is the useful warning.

The zero tests here are exact. The coefficients are integer polynomials in a twentieth root of unity, divided by 400400400. Reducing those polynomials modulo x8−x6+x4−x2+1x^8-x^6+x^4-x^2+1x8−x6+x4−x2+1 distinguishes a true zero from a small numerical value.

Let the primes read the table

Take each prime greater than one hundred. Read its two-digit entry, subtract the mean belonging to its final digit, divide by the prime, and add. With S∘(p)=T∘(p mod 100)S^\circ(p)=T^\circ(p\bmod100)S∘(p)=T∘(pmod100), this gives

H(x)=∑100<p≤xS∘(p)p.H(x)=\sum_{100<p\le x}\frac{S^\circ(p)}p.H(x)=100<p≤x∑​pS∘(p)​.

Three curves use every prime greater than one hundred and below ten million. The raw integer-deviation sum ends near minus 0.547180, global centering near 0.072136 and family centering near 0.077216. Three curves use every prime greater than one hundred and below ten million. The raw integer-deviation sum ends near minus 0.547180, global centering near 0.072136 and family centering near 0.077216.
Each curve includes all 664,554 eligible primes, with no downsampling. The upper curve sums S(p)/p. The middle adds one half to every table entry. The lower subtracts the appropriate family mean. Vertical scales differ. These endpoints are finite computations, not certified values of the limits.

The three curves use exactly the same primes. The first retains the integer table’s bias. The second removes its single global mean. The third removes each family mean. Both centered sums converge, generally to different limits. Family centering earns its place by the additional character patterns it eliminates, not by being the only subtraction that permits convergence.

Primes included Last prime Family-centered sum
1,000 8,167 0.081643173
10,000 105,019 0.077004672
100,000 1,300,051 0.077300691
664,554 9,999,991 0.077215575

Those are finite values. The last one is not an asserted value of the limit.

The proof begins with the finite character expansion. The centered table is a finite linear combination of nonprincipal characters. For each such character, the sum ∑p≤xχ(p)/p\sum_{p\le x}\chi(p)/p∑p≤x​χ(p)/p converges. A finite combination of convergent sums converges.

The classical step is Mertens’ theorem in arithmetic progressions. Every allowed address receives the same leading share of the prime harmonic sum. Nonprincipal character weights add to zero over those addresses. Their common growing term cancels, leaving a constant and an error tending to zero.

This works for every fixed base and positive lag, starting beyond bℓ+1b^{\ell+1}bℓ+1. It does not require an estimate from the graph. Without the reciprocal weights, the average centered entry over primes tends to zero by the prime number theorem in arithmetic progressions. The reciprocal-prime sum itself need not tend to zero.

From six entries to 131,072

The same family balance and reflection law hold as the tables grow. These plates show every allowed address. Addresses increase from left to right, then continue on the next row. This compact arrangement makes reflection a half-turn of each rectangle. Gold turns to teal; a zero stays at the background color.

Nine complete centered tables show varied bases and lags, from forty entries to 16384. Every rectangle reverses gold and teal under a half-turn. Nine complete centered tables show varied bases and lags, from forty entries to 16384. Every rectangle reverses gold and teal under a half-turn.
Each cell is one allowed address, in increasing row-major order. Gold is positive and teal negative. Entries are divided by the number of matching slices, then colored on one symmetric logarithmic scale. Nothing is clipped. The character transform has not been applied.

The common color scale divides each centered entry by the number of matching intervals, bℓb^\ellbℓ, with symmetric logarithmic spacing to retain smaller variations. No values are clipped. Color does not encode character power. These are the entries before the character transform.

Two complete high-resolution fields show all forty thousand decimal lag-four entries above and all 131072 base-sixty-four lag-two entries below. Fine bands and crossing structures remain visible at full size. Two complete high-resolution fields show all forty thousand decimal lag-four entries above and all 131072 base-sixty-four lag-two entries below. Fine bands and crossing structures remain visible at full size.
The upper rectangle is 200 by 200 cells; the lower is 256 by 512. Addresses increase across each row, then down. The scale matches the atlas. Each cell retains its own value and each reflected pair its opposite sign. Select the image for full-resolution zoom and pan.

The upper field contains all forty thousand decimal addresses at lag four. The lower contains all 131,072 allowed addresses in base sixty-four at lag two. No cells are sampled or averaged. Select a plate to inspect it at full resolution.

Three compact views of the calculation
The six-entry ledger keeps the raw values, the family means and the centered values together. Reflected addresses pair across its columns.
The six-entry ledger keeps the raw values, the family means and the centered values together. Reflected addresses pair across its columns.
The compact three-stage spectrum compares the raw table, global centering and family centering. The surviving powers are four ninths in both modes.
The compact three-stage spectrum compares the raw table, global centering and family centering. The surviving powers are four ninths in both modes.
The two-curve view compares the raw and family-centered sums. It uses the same prime range, with separate vertical scales.
The two-curve view compares the raw and family-centered sums. It uses the same prime range, with separate vertical scales.

Return to 100910091009 and 110911091109. They share the final digit nine, but their lag-two table entries are eight and minus ten. No last-digit average can account for the eighteen between them.

Subtract that average. The two entries move together.

Eighteen stays eighteen.

Companion paper: The Centered Collision Sum →
Share

Discussion

Sign in to join the discussion.

← All articlesRead the paper →
← Previous: The Collision Fluctuation Sum
Next: The Collision Periodic Table →