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

The Collision Periodic Table

December 2, 202316 min read
Companion paper: The Collision Periodic Table →
Fine blue and warm gold filaments gather into a finite pattern of connected lights against black space.
The denominator can grow without changing its deviation. Its last two digits return it to the same cell.

Every prime number past 100, in base ten, has a small integer attached to it. The integer is determined entirely by the prime’s last two digits.

At 109109109, it is +8+8+8. At 100910091009, it is +8+8+8 again.

To find it, write the fractions 1/1091/1091/109 through 108/109108/109108/109. Read the first two decimal digits of each fraction and count the rows where they agree.

 1/109 = 0.00917…    match
 2/109 = 0.01834…    no match
12/109 = 0.11009…    match
13/109 = 0.11926…    match

Eighteen rows match. Now group the rows by their first digit. These ten bins have ten or eleven rows apiece. Subtract the smaller size, ⌊108/10⌋=10\lfloor108/10\rfloor=10⌊108/10⌋=10. That leaves eight.

At 100910091009, there are 108108108 matches. The bin size is now 100100100. Eight again.

Two sets of ten strips locate every fraction with matching first two decimal digits at denominators 109 and 1009. The strips hold eighteen and 108 points, respectively. Two sets of ten strips locate every fraction with matching first two decimal digits at denominators 109 and 1009. The strips hold eighteen and 108 points, respectively.
A dot is one matching fraction, positioned within its hundredth. The rows run from 00 to 99. The two denominators give different counts in every row, but subtracting their bin scales leaves eight in both cases.

The fractions have changed. There are nine hundred more of them. The subtraction leaves the same integer because the denominator still ends in 090909.

The Collision Fluctuation Sum uses the mean of a finite table to explain a drift across primes. The Centered Collision Sum subtracts its family means. Here I want to put the table itself on the page, including the endpoint arithmetic that fixes its balance.

Find the ending

Call the number of matching rows Cb(N)C_b(N)Cb​(N), where bbb is the base and NNN the denominator. Subtract the bin scale to get the reduced count

Sb(N)=Cb(N)−⌊N−1b⌋.S_b(N)=C_b(N)-\left\lfloor\frac{N-1}{b}\right\rfloor.Sb​(N)=Cb​(N)−⌊bN−1​⌋.

The denominators in this article are coprime to the base. In decimal, they end in 111, 333, 777 or 999. Combine those four endings with ten possible tens digits and there are forty places to look.

Forty address cells show each reduced count, with two short bars comparing the collision count and bin scale at that address. The extreme entries are plus eight at 09 and minus nine at 91. Forty address cells show each reduced count, with two short bars comparing the collision count and bin scale at that address. The extreme entries are plus eight at 09 and minus nine at 91.
The large number is the difference between the two bars. Teal gives the matches at the small address itself; gray gives its bin scale. The scale is shared across all forty cells. At 09 the bars are eight and zero. At 91 they are zero and nine.

For 109109109, go to row zero, column nine. The entry is +8+8+8. For 191191191, go to row nine, column one. The entry is −9-9−9.

The table also handles 50,009=43×116350{,}009=43\times116350,009=43×1163. Its 5,0085{,}0085,008 matches exceed the bin scale of 5,0005{,}0005,000 by eight. Primality never enters this calculation.

All forty entries as numbers

The row supplies the tens digit. The column supplies the units digit. These are the reduced counts, not the collision counts themselves.

First digit 1 3 7 9
0 0 +2 0 +8
1 −1 −1 +1 −1
2 0 −2 +6 0
3 −1 −1 −3 −1
4 −4 0 −2 0
5 −1 +1 −1 +3
6 0 +2 0 0
7 −1 −7 +1 −1
8 0 −2 0 0
9 −9 −1 −3 −1

There are eight positive entries, twelve zeros and twenty negative entries. Cell 010101 is zero. The finite floor formula below defines that cell directly; equivalently, the empty fraction list at denominator one has count zero.

The hundred little intervals

Put the fractions on the interval from zero to one. Cut it into a hundred equal pieces. A fraction in the first piece begins 0.000.000.00, one in the next begins 0.010.010.01, and so on.

A match lands in one of ten pieces

00,11,22,…,99.00,\quad11,\quad22,\quad\ldots,\quad99.00,11,22,…,99.

Now increase the denominator from NNN to N+100N+100N+100. Each of the hundred pieces gains exactly one fraction. Each matching piece therefore gains one match. The collision count goes up by ten. The bin scale also goes up by ten. Their difference stays unchanged.

Two ten-by-ten grids locate all eight fractions at denominator nine and all 108 fractions at denominator 109. Only the diagonal cells have matching first and second digits. Every cell gains exactly one point. Two ten-by-ten grids locate all eight fractions at denominator nine and all 108 fractions at denominator 109. Only the diagonal cells have matching first and second digits. Every cell gains exactly one point.
Each cell is one hundredth of the unit interval, indexed by the two leading digits. Gold points lie in matching cells. Horizontal position locates the fraction within its cell. Going from nine to 109 adds one to every cell count, not just the diagonal counts.

The dots do not stay put. They move to the positions specified by the new denominator. It is the number in each piece that increases by one.

You can check this with floors. Piece jjj has count

⌊(j+1)N100⌋−⌊jN100⌋,\left\lfloor\frac{(j+1)N}{100}\right\rfloor -\left\lfloor\frac{jN}{100}\right\rfloor,⌊100(j+1)N​⌋−⌊100jN​⌋,

except in the last piece, where we subtract one to exclude the endpoint 111. Replacing NNN by N+100N+100N+100 adds j+1j+1j+1 to the first floor and jjj to the second. The difference gains one. The excluded endpoint remains excluded.

Coprimality keeps the fractions off every interior boundary, so there is no rounding ambiguity to settle.

In base bbb, there are b2b^2b2 pieces and bbb matching ones. Adding b2b^2b2 to the denominator adds bbb to both counts. One finite function TbT_bTb​ therefore supplies every reduced count

Sb(N)=Tb(N mod b2).S_b(N)=T_b(N\bmod b^2).Sb​(N)=Tb​(Nmodb2).

Forty entries suffice in decimal, however many digits the denominator has.

Seventeen fills what eighty-three leaves empty

Take two addresses that add to one hundred. Their table values always add to minus one.

T10(09)+T10(91)=8−9=−1,T10(27)+T10(73)=6−7=−1,T10(41)+T10(59)=−4+3=−1.\begin{aligned} T_{10}(09)+T_{10}(91)&=8-9=-1,\\ T_{10}(27)+T_{10}(73)&=6-7=-1,\\ T_{10}(41)+T_{10}(59)&=-4+3=-1. \end{aligned}T10​(09)+T10​(91)T10​(27)+T10​(73)T10​(41)+T10​(59)​=8−9=−1,=6−7=−1,=−4+3=−1.​

To see where the missing one comes from, use 171717 and 838383. Neither denominator reaches a hundred, so its fractions are more than one hundredth apart. No piece can hold two of them.

The matching pieces 000000 and 999999 are empty at both denominators. The first positive fraction lies above 0.010.010.01; the last lies below 0.990.990.99.

That leaves eight interior pieces. In each, exactly one of the two denominators supplies a fraction.

Ten paired strips compare denominators seventeen and eighty-three. Seventeen fills the 11 and 88 pieces, while eighty-three fills 22 through 77. Both leave 00 and 99 empty. Ten paired strips compare denominators seventeen and eighty-three. Seventeen fills the 11 and 88 pieces, while eighty-three fills 22 through 77. Both leave 00 and 99 empty.
The eight fractions are labelled individually. Each of the eight interior matching pieces contains a point from exactly one denominator. Their combined count is eight; their combined bin scale is nine. That single missing match gives the reflection sum of minus one.

Seventeen supplies two matches. Eighty-three supplies six. Together, eight. Their bin scales are one and eight. Together, nine.

The reduced counts must add to 8−9=−18-9=-18−9=−1.

The endpoint arithmetic in any base

Put q=b2q=b^2q=b2 and choose an address aaa coprime to bbb, with 1≤a<q1\leq a<q1≤a<q. For a piece numbered jjj, write its floor increment as

Dj(a)=⌊(j+1)aq⌋−⌊jaq⌋.D_j(a)=\left\lfloor\frac{(j+1)a}{q}\right\rfloor -\left\lfloor\frac{ja}{q}\right\rfloor.Dj​(a)=⌊q(j+1)a​⌋−⌊qja​⌋.

For every interior boundary 1≤j<q1\leq j<q1≤j<q, coprimality gives

⌊j(q−a)q⌋=j−1−⌊jaq⌋.\left\lfloor\frac{j(q-a)}q\right\rfloor =j-1-\left\lfloor\frac{ja}q\right\rfloor.⌊qj(q−a)​⌋=j−1−⌊qja​⌋.

Subtract successive instances. For an interior piece, where 1≤j≤q−21\leq j\leq q-21≤j≤q−2, the two increments add to one. At the first and last pieces they instead add to zero and two

D0(a)+D0(q−a)=0,Dj(a)+Dj(q−a)=1,Dq−1(a)+Dq−1(q−a)=2.\begin{aligned} D_0(a)+D_0(q-a)&=0,\\ D_j(a)+D_j(q-a)&=1,\\ D_{q-1}(a)+D_{q-1}(q-a)&=2. \end{aligned}D0​(a)+D0​(q−a)Dj​(a)+Dj​(q−a)Dq−1​(a)+Dq−1​(q−a)​=0,=1,=2.​

The matching pieces have indices d(b+1)d(b+1)d(b+1) for d=0,…,b−1d=0,\ldots,b-1d=0,…,b−1. They include both end pieces and b−2b-2b−2 interior pieces. Each last-piece increment counts the excluded endpoint once. Removing it from each denominator leaves

Cb(a)+Cb(q−a)=0+(b−2)+2−2=b−2.\begin{aligned} &C_b(a)+C_b(q-a)\\ &\quad=0+(b-2)+2-2\\ &\quad=b-2. \end{aligned}​Cb​(a)+Cb​(q−a)=0+(b−2)+2−2=b−2.​

The two bin scales add to b−1b-1b−1. Indeed, write a=bh+sa=bh+sa=bh+s with 1≤s<b1\leq s<b1≤s<b. The scales are hhh and b−h−1b-h-1b−h−1. Subtracting gives

Tb(a)+Tb(b2−a)=(b−2)−(b−1)=−1.\begin{aligned} &T_b(a)+T_b(b^2-a)\\ &\quad=(b-2)-(b-1)\\ &\quad=-1. \end{aligned}​Tb​(a)+Tb​(b2−a)=(b−2)−(b−1)=−1.​

The finite table itself can be calculated without choosing any larger denominator

Tb(a)=−1−⌊ab⌋+∑d=0b−1Dd(b+1)(a).T_b(a)=-1-\left\lfloor\frac ab\right\rfloor +\sum_{d=0}^{b-1}D_{d(b+1)}(a).Tb​(a)=−1−⌊ba​⌋+d=0∑b−1​Dd(b+1)​(a).

At address one, the same formula uses the empty count Cb(1)=0C_b(1)=0Cb​(1)=0.

The center of the table is therefore −1/2-1/2−1/2. The extremes +8+8+8 and −9-9−9 are equally far from it.

There are twenty reflected pairs in decimal. Each pair contributes minus one, so the forty entries have mean −1/2-1/2−1/2. Exactly twenty entries are negative. Two nonnegative integers cannot add to −1-1−1, and two negative integers add to at most −2-2−2. Each pair must have one of each kind.

This counts cells, not primes. How the primes visit those cells is a separate question.

Change the base

In base three the whole table fits into six places. Addresses below are written in base three; the entries are ordinary signed integers.

First digit Last digit 1 Last digit 2
0 0 +1
1 0 −1
2 −2 −1

Rotate the rectangle through half a turn. Each cell meets its reflected partner. The pair sums are 0−10-10−1, 1−21-21−2 and 0−10-10−1. Three pairs, three deficits.

Base twelve has forty-eight cells, of which twenty-four are negative. Its largest value is +10+10+10 and its smallest −11-11−11. The gallery follows these small tables into larger bases. Every cell is calculated, including the fine bands in the largest views.

From six cells to 123,462
Nine complete periodic tables grow from six base-three cells to 3840 base-120 cells. Fine gold and teal bands emerge in the larger bases, with opposite colors under a half-turn. Nine complete periodic tables grow from six base-three cells to 3840 base-120 cells. Fine gold and teal bands emerge in the larger bases, with opposite colors under a half-turn.
The same floor formula draws every panel. Rows give the first address digit and columns the allowed final digits. The colors use a common symmetric logarithmic scale for the reduced count shifted by one half and divided by the base. The numbers in the three smallest panels are the unshifted integer entries.

Rows give the first address digit. Columns give the allowed final digits in increasing order; digits sharing a factor with the base are omitted. For comparison across bases, the color shows (Tb+1/2)/b(T_b+1/2)/b(Tb​+1/2)/b on one symmetric logarithmic scale. Gold and teal exchange under a half-turn. This centers the colors on the reflection midpoint; it does not subtract a family mean.

Two full-resolution tables compare bases 360 and 361. The first has 34,560 cells arranged in wide columns; the second has 123,462 cells and many narrow diagonal bands. Two full-resolution tables compare bases 360 and 361. The first has 34,560 cells arranged in wide columns; the second has 123,462 cells and many narrow diagonal bands.
Both views include every allowed address, using the atlas color scale without clipping. The upper table is 360 by 96 cells; the lower is 361 by 342. Select the image for full-resolution zoom and pan. Labels give digit values in decimal notation.

Base 360360360 has 969696 allowed final digits and 34,56034{,}56034,560 cells. Base 361=192361=19^2361=192 has 342342342 allowed final digits and 123,462123{,}462123,462 cells. Both plates retain every cell. Select either figure to inspect the full-resolution image.

The forty-eight base-twelve entries

Row and column labels give digit values in ordinary decimal notation, so the last row is digit eleven. Only final digits 111, 555, 777 and 111111 are coprime to twelve.

First digit 1 5 7 11
0 0 0 0 +10
1 −1 −1 −1 −1
2 −2 0 +2 0
3 −3 −1 +1 +1
4 0 0 +6 +2
5 −5 +1 −5 −1
6 0 +4 −2 +4
7 −3 −7 −1 −1
8 −2 −2 0 +2
9 −1 −3 −1 +1
10 0 0 0 0
11 −11 −1 −1 −1

The reflection law fixes the mean and the negative half in every base. To fix the extremes, we need one more count. At an address below b2b^2b2, each matching piece contains at most one fraction. The first and last pieces are empty. There can be at most b−2b-2b−2 matches, and subtracting a nonnegative bin scale cannot raise that ceiling.

Eight, before the primes

Nine reaches the ceiling in decimal. Write its eight fractions

1/9 = 0.111…       5/9 = 0.555…
2/9 = 0.222…       6/9 = 0.666…
3/9 = 0.333…       7/9 = 0.777…
4/9 = 0.444…       8/9 = 0.888…

Eight matches. Bin scale zero. Reduced count +8+8+8.

In base b≥3b\geq3b≥3, denominator b−1b-1b−1 does the same thing. Its b−2b-2b−2 fractions each repeat a single digit, attaining b−2b-2b−2. Reflection forces the other extreme, −(b−1)-(b-1)−(b−1), at address b2−b+1b^2-b+1b2−b+1. Base two has just the two entries 000 and −1-1−1.

Adding a hundred to nine gives 109109109. The matching count rises to eighteen and the bin scale to ten. Add another nine hundred and they become 108108108 and 100100100.

Now write a thousand digits to the left of 090909. Nobody is going to list all those fractions. The excess count is already settled by the eight fractions of nine that fit on these four lines.

The decimal ledger, its twenty pairs, and the sign counts
The decimal ledger gives all forty reduced counts, with addresses in each cell and the two extremes outlined.
The decimal ledger gives all forty reduced counts, with addresses in each cell and the two extremes outlined.
Twenty number lines join reflected decimal entries. Every line has midpoint minus one half, including the pair eight and minus nine.
Twenty number lines join reflected decimal entries. Every line has midpoint minus one half, including the pair eight and minus nine.
Each bar divides a complete table into negative, zero and positive cells. The numbers are counts; the widths are proportions. Exactly half of every bar is negative.
Each bar divides a complete table into negative, zero and positive cells. The numbers are counts; the widths are proportions. Exactly half of every bar is negative.
Companion paper: The Collision Periodic Table →
Share

Discussion

Sign in to join the discussion.

← All articlesRead the paper →
← Previous: The Centered Collision Sum
Next: The Collision Transform and the Critical Strip →