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

The Centered Collision Sum

October 6, 202313 min read
Companion paper: The Centered Collision Sum →
Grouped arcs share a level while finer loops remain visible above and below it. Subtracting each last-digit family's own average removes the common bias and preserves the differences within that family. The finer character channels carry what survives.
Grouped arcs share a level while finer loops remain visible above and below it. Subtracting each last-digit family's own average removes the common bias and preserves the differences within that family. The finer character channels carry what survives.

The collision table of the decimal primes leans by last digit. It has forty entries, indexed by a prime’s last two digits once the prime passes a hundred. The entries for primes ending in 1 average −1.7-1.7−1.7, those for primes ending in 9 average +0.7+0.7+0.7, and 3 and 7 sit in between. The Collision Fluctuation Sum corrected the whole table by one overall amount, which was enough to stop its prime sum from drifting. Correct each last digit by its own average instead and something stronger happens. The table loses whole patterns of variation it could carry before. A table of two-digit endings has room for forty such patterns. Eighteen survive the correction, and the decimal table turns out to use seventeen of them.

The same correction works however far apart the compared digits sit. Comparing the first decimal place with the third, instead of the second, needs a bigger table, one read by a prime’s last three digits, and the primes 1009 and 1109 show why. Both end in 09. For each one, write every fraction between zero and one and count those whose first and third decimal places agree, so that 0.171…0.171\ldots0.171… counts and 0.173…0.173\ldots0.173… doesn’t, whatever the middle digit. Then subtract the size of the smaller digit bin.

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

They share their last two digits and still land on opposite sides of zero.

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.
Every matching three-digit beginning at 1009 and 1109, one cell each. At 1009 eight cells hold a second fraction, which is the +8. At 1109 every cell holds one fraction, and the larger bin size leaves −10.

When the compared places are neighbors, two final digits fix this number. When they are two apart it takes three, and 009 and 109 are different addresses in the bigger table. The two primes do share a last digit, though, which puts them in the same family, and the family has an exact average. Subtract it from both and the eighteen-point gap between them survives untouched. Centering by family takes out what the last digit can explain and leaves the rest alone.

One more digit

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

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

The farther apart the compared places, the more of ppp’s ending the count depends on.

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 has modulus q=bℓ+1q=b^{\ell+1}q=bℓ+1, and once p>qp>qp>q the remainder of ppp on division by qqq decides S(p)S(p)S(p) exactly. The denominator doesn’t even have to be prime. Any denominator coprime to the base reads the same table.

The hundred cells in the first figure show why. Each one is a matching three-digit beginning, an interval of width 1/10001/10001/1000. Add a thousand to the denominator and every one of those intervals picks up exactly one more fraction. The count rises by a hundred, the bin size rises by a hundred, and their difference doesn’t move. The interval endpoints need a little bookkeeping, which is in the details below, but they don’t spoil 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​⌋.

Adding up 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, so CCC and QQQ both rise by bℓb^\ellbℓ and SSS repeats with period qqq. 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 gets longer as the compared places move apart. It never gets longer because the primes get larger.

Move the whole column

Back to decimal and neighboring places. The forty two-digit endings fall into four columns by their last digit, and the forty-entry table in The Collision Fluctuation Sum gives each column’s average 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 primes are sampled here. These are averages of four short lists.

All forty entries together average −1/2-1/2−1/2. Adding a half to every entry balances the full table, but each column keeps its own lean. Subtracting each column’s own average balances all four.

One piece of bookkeeping is worth stating. These are averages of S=C−QS=C-QS=C−Q. The deviation Δ\DeltaΔ in The Collision Fluctuation Sum used a slightly larger benchmark, which is why its drift came to −9/10-9/10−9/10 rather than −1/2-1/2−1/2. Here we are centering the integer table itself.

Base three shows the whole operation in six numbers. At lag one its addresses are 1, 2, 4, 5, 7 and 8, and they fall into two families 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 entry in the first family rises by two thirds and every entry in the second by one third. After that, both families add to zero. Inside a family, nothing moves relative to anything else.

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.
Base three’s six entries before centering, as open circles, and after, filled. Each family slides up as a whole until it averages zero, and the gaps inside it stay exactly as they were.

Now pair the addresses around nine. The centered entries at 1 and 8 are opposites, and so are those at 2 and 7, and at 4 and 5. Those are the two balances everything below rests on. Each family adds to zero, and reflection flips 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, and averaging it over a family gives μ(u)+μ(b−u)=−1\mu(u)+\mu(b-u)=-1μ(u)+μ(b−u)=−1. Subtracting one from the other yields

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

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

For a prime base at lag one, adding up the floor counts gives the shorter formula μ(u)=u/b−1\mu(u)=u/b-1μ(u)=u/b−1, so in base seven the means run evenly from −6/7-6/7−6/7 to −1/7-1/7−1/7. Composite bases need not keep that spacing, and the decimal means above don’t.

Weights that hear nothing

Read the centered table through a set of weights, multiplying each entry by its weight and adding. If every entry in a family gets the same weight, the answer is zero, because each family already adds to zero. If the weights agree at reflected addresses, the answer is zero again, because reflected entries cancel in pairs.

Dirichlet characters are the complete set of weighting patterns that respect multiplication. A character is even when it gives aaa and q−aq-aq−a the same weight and odd when it gives them opposite weights. Put the two observations together and only odd characters that also vary inside a family can pick anything up from the centered table. Everything else hears silence. That restriction is the spectral gate.

Base three makes it visible. Multiplying by two walks the six addresses around a cycle,

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

and the six characters are the six Fourier modes around that 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 see a difference 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.
The six characters at modulus nine as arrows around the cycle 1, 2, 4, 8, 7, 5, with their power below. Centering wipes out mode zero and mode three, and the two survivors carry four ninths each.

Taking out the overall average kills mode zero. Taking out the family averages kills mode three as well. What is left are modes one and five, each with power 4/94/94/9, and they are exactly the modes that turn their weights inside the families, where the entries still differ.

Eighteen allowed, seventeen used

Decimal at lag one has forty characters modulo one hundred. Twenty of them are even, so reflection rules them out. Four read only the last digit. Two of those are already even, and family centering rules out the other two, which leaves

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

characters the centered table is allowed to use.

Allowed is not the same as used. Working out the forty-entry table exactly gives seventeen nonzero coefficients, not eighteen. The missing one weights an odd address +1+1+1 when it is 1 modulo four and −1-1−1 when it is 3 modulo four. It passes both tests, and its coefficient comes out zero anyway.

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.
All forty characters modulo one hundred. Crosses are even, teal squares only read the last digit, and the gold dots, sized by power, are the seventeen that survive. The purple ring is allowed but empty.

The gate says where a coefficient can live. The entries decide whether one does.

The four weighting patterns of The Character Structure of the Collision Fluctuation are among those the gate removes. There they recombined running sums over primes. Here they read the finite table, each giving one weight to a whole family, so centering sends all four table coefficients to zero. The prime sums need not follow, because at any finite cutoff the addresses carry different total weight from the primes.

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, and so do the other twenty. Its weighted total is their difference, so it is zero as well.

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

So the gate means “not inherited from modulus ten,” which is not the same as “conductor greater than ten,” and the character modulo four is the reminder.

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

Let the primes read the table

Now let the primes in. Take each prime above one hundred, read its entry from the table, subtract the average for its last digit, divide by the prime and add. Writing S∘(p)=T∘(p mod 100)S^\circ(p)=T^\circ(p\bmod100)S∘(p)=T∘(pmod100), the sum is

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.
The same 664,554 primes summed three ways. The raw sum keeps sliding down, while removing the overall average or each family’s average lets it settle, near 0.072 and 0.077.

All three curves use exactly the same primes. The first carries the table’s overall lean and keeps sliding. The second removes the single overall average and the third removes each family’s average, and both settle, at different values. So family centering is not the only way to make the sum converge. What it adds is the patterns it removes.

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, and the last is not a claimed value of the limit.

The proof doesn’t lean on the graph. The centered table is a finite combination of nonprincipal characters. For each of those, the sum of χ(p)/p\chi(p)/pχ(p)/p over primes converges, and a finite combination of convergent sums converges too. The classical input is Mertens’ theorem in arithmetic progressions, which gives every allowed address the same leading share of the prime harmonic sum. Nonprincipal weights add to zero over the addresses, so that shared growth cancels and only a constant and a vanishing error remain.

This holds for every base and every lag once the primes pass bℓ+1b^{\ell+1}bℓ+1. Without the reciprocal weights, the plain average of the centered entries over primes tends to zero, by the prime number theorem in arithmetic progressions. With them, the sum settles at a constant that need not be zero.

From six entries to 131,072

The family balance and the reflection law hold however large the tables grow. These plates show every allowed address, increasing from left to right and then down, an arrangement in which reflection is a half turn of each rectangle. Gold turns to teal under the turn, and a zero stays 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.
Centered tables for nine bases and lags, every address one cell, gold positive and teal negative. Turning any panel halfway around flips every color.

The color scale divides each centered entry by the number of matching intervals, bℓb^\ellbℓ, and spaces the colors logarithmically in both directions so small variations still show. Nothing is clipped, and these are the table entries themselves, before any 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.
Every address in base ten at lag four, 40,000 cells, and in base sixty-four at lag two, 131,072 cells, nothing averaged. The half-turn still flips every color.

The upper field holds all forty thousand decimal addresses at lag four and the lower all 131,072 allowed addresses in base sixty-four at lag two, with no cells sampled or averaged. Each plate opens 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 from base three, raw values, family means and centered values side by side.
The compact three-stage spectrum compares the raw table, global centering and family centering. The surviving powers are four ninths in both modes.
The three-stage spectrum in one view, raw, globally centered and family centered, with four ninths left in each surviving mode.
The two-curve view compares the raw and family-centered sums. It uses the same prime range, with separate vertical scales.
The raw and family-centered prime sums over the same primes, on separate vertical scales.

At lag two, 1009 and 1109 share a last digit and still sit eighteen apart, eight against minus ten. Subtracting their family’s average moves both by the same amount, so the eighteen survives. That is the kind of difference the gate leaves room for, a difference inside a family, and only the odd characters that turn their weights from one address to the next can see it.

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 →