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

Bin Derangements and the Gate Width Theorem

July 4, 202213 min read
Companion paper: Bin Derangements and the Gate Width Theorem →
Colored arcs and points cross a row of vertical light-filled columns, from orange through blue to violet.
The digit bins fill as the prime grows. For primes greater than ten, the zero set still comes from the same nine fractions.

Write down the twelve fractions from 1/131/131/13 to 12/1312/1312/13 and look at their first decimal digits. Two rows begin with 3,

4/13 = 0.307692...
5/13 = 0.384615...

Two others, 8/138/138/13 and 9/139/139/13, begin with 6. Every other first digit belongs to just one row. If we group the numerators by their first digit, we have ten bins. Eight hold one number. Two hold two.

Now multiply every numerator by 6 and take the remainder after division by 13. The numerator 5 becomes 4, because 6×5=306\times5=306×5=30 leaves remainder 4. Both fractions begin with 3. That is one collision. The numerator 8 becomes 9, and both of those fractions begin with 6. That is another.

No other numerator keeps its first digit under this multiplication. The collision count for 6 is two.

Try every multiplier from 2 to 12. Multiplication by 1 would leave all twelve rows alone, so set it aside.

Multiplier Collisions
2 0
3 0
4 0
5 0
6 2
7 0
8 0
9 0
10 0
11 2
12 0

Nine zeros. Each of those nine multipliers moves every numerator out of its original digit bin. I call it bin deranging.

Nine at p=13p=13p=13. Nine at p=29p=29p=29. Nine at p=83p=83p=83. Nine at p=1009p=1009p=1009.

At thirteen there are only two nonidentity multipliers left over. At a thousand and nine there are 998. Yet the number with no collisions is still nine. For every prime greater than ten, the count is the same.

In base seven the count is six, for every prime greater than seven. In base three it is two. In any base bbb, every prime p>bp>bp>b has exactly b−1b-1b−1 bin-deranging multipliers. This is the gate width theorem.

A list before the prime

There is more to the answer than a count. In base ten, the entire zero set comes from nine fixed fractions. The first is −1/9-1/9−1/9. The last is −9-9−9, with −1-1−1 in the middle.

These are fractions in modular arithmetic. For example, −1/9-1/9−1/9 modulo 13 means the number that gives −1-1−1 when multiplied by 9. That number is 10, since 9×10=909\times10=909×10=90 is one less than a multiple of 13. At prime 29, the same fraction gives 16, since 9×16=1449\times16=1449×16=144 is one less than a multiple of 29.

The fraction stays fixed. Its residue changes with the prime.

Nine rational numbers across the columns, with their residues modulo 13, 29, 83 and 1009 in four rows. Each row lists all nine zero-collision multipliers in base ten.
The zeros move from prime to prime, but each row comes from the same nine fractions.

For a general base, the list is

gu≡−ub−u(modp).g_u\equiv-\frac{u}{b-u}\pmod p.gu​≡−b−uu​(modp).

Run uuu from 1 to b−1b-1b−1. Every denominator is smaller than ppp, so every division is defined. The resulting multipliers are distinct, and these are all the zeros.

Read the list from opposite ends. The first and last fractions multiply to 1. So do the second and second-last. In the general formula, uuu and b−ub-ub−u give inverse multipliers. If a multiplier moves every row out of its bin, undoing that multiplication does too.

For an even base, the middle fraction is −1-1−1. In decimal this is the familiar complement operation. It exchanges digit 0 with 9, 1 with 8, and so on. No decimal digit is its own complement, so every row changes bins. The complement sits in the middle of a larger exact family.

From first digits to last digits

The bins are short intervals of numerators. At thirteen, 4 and 5 sit together because their fractions both begin with 3. But multiplying an interval modulo a prime scatters its entries. It is hard to see all the zero multipliers by watching those intervals move.

Replace each numerator rrr by the remainder of 10r10r10r divided by 13. The pair 4 and 5 becomes 1 and 11. The pair 8 and 9 becomes 2 and 12.

The first pair now shares a last digit. So does the second. This happens for every bin. A shared first digit in the fractions becomes a shared last digit in the transformed remainders.

In base bbb, the substitution is x=[br]px=[br]_px=[br]p​, where the brackets mean take the remainder modulo ppp between 1 and p−1p-1p−1. A collision under multiplication by ggg is now exactly

x≡[gx]p(modb).x\equiv[gx]_p\pmod b.x≡[gx]p​(modb).

Multiply xxx by ggg, reduce modulo ppp, then compare modulo the base. The order of those steps is important. We have replaced a question about intervals by a question about numbers separated by whole multiples of bbb.

The two sides of ten

There is a useful way to label each nonidentity multiplier. Solve

c(1−g)≡b(modp)c(1-g)\equiv b\pmod pc(1−g)≡b(modp)

and choose ccc between 1 and p−1p-1p−1. Each multiplier gets exactly one label. The label bbb is excluded because it would give g=0g=0g=0.

Now the zero set has a simple description. Labels below the base give no collisions. Labels above the base always give at least one collision.

At prime 13, the digit-bin pairs 4,5 and 8,9 become 1,11 and 2,12 under multiplication by 10. A parameter line separates the nine zero multipliers at c below 10 from the two positive multipliers at c above 10.
Relabel the residues and the scattered zeros line up. The cutoff is the base itself.

The reason is short enough to follow here. Suppose a collision occurs. Its transformed remainders xxx and yyy have the same last digit in the chosen base, so y=x+mby=x+mby=x+mb for an integer mmm. The equation defining ccc then forces x+mcx+mcx+mc to be divisible by ppp.

If 0<c<b0<c<b0<c<b, the number x+mcx+mcx+mc lies between xxx and yyy. Whether mmm is positive or negative, stepping by ccc takes us part of the way that stepping by bbb does. Both endpoints are strictly between 0 and ppp. Nothing between them can be divisible by ppp.

That rules out a collision on the entire lower side.

On the upper side, we can write down a collision. For c>bc>bc>b, take x=p−cx=p-cx=p−c. Multiplication by ggg, followed by reduction modulo ppp, sends it to x+bx+bx+b. Both numbers lie between 1 and p−1p-1p−1, and they agree modulo bbb.

At thirteen, the multiplier 6 has label c=11c=11c=11. The construction gives x=2x=2x=2 and y=12y=12y=12. They end in the same digit. Undo the substitution and they become the original pair 8 and 9, the collision we saw at the beginning.

So the zero labels are exactly 1,2,…,b−11,2,\ldots,b-11,2,…,b−1. Solving for ggg and setting u=b−cu=b-cu=b−c gives the fractions −u/(b−u)-u/(b-u)−u/(b−u). The count and the list come from the same argument.

The proof examines every nonzero multiplier. It works whether the base visits all the nonzero residues in one cycle or divides them among several. When the base does visit them all, multiplying by a power of the base is a cyclic shift of the repetend, and these b−1b-1b−1 multipliers give exactly its zero-match shifts. On a shorter cycle, a shift can miss every digit in that cycle while still producing collisions elsewhere. The full table is the object being classified here.

Four matches, two ways

Return to the two crowded bins at thirteen. Inside the digit-3 bin, there are two ways to go from one residue to a different residue. We can go from 4 to 5, or from 5 to 4. Inside the digit-6 bin, we can go from 8 to 9, or from 9 to 8.

Four ordered pairs in total. Each pair belongs to exactly one multiplier.

Two two-by-two tables show ordered pairs within the bins 4,5 and 8,9. The diagonal cells belong to the identity. The four off-diagonal cells split into two for multiplier 6 and two for multiplier 11.
The matches can be counted inside the bins before we sort them by multiplier. This gives their total without testing each multiplier in turn.

This gives a second result. A bin containing ndn_dnd​ residues has nd(nd−1)n_d(n_d-1)nd​(nd​−1) ordered pairs with different entries. Add those counts over the bins and we have all the collisions outside the identity. The zero multipliers contribute nothing. The remaining p−b−1p-b-1p−b−1 multipliers share the total, so their mean is

C‾=∑dnd(nd−1)p−b−1.\overline C=\frac{\sum_d n_d(n_d-1)}{p-b-1}.C=p−b−1∑d​nd​(nd​−1)​.

At thirteen, four matches divided between two multipliers gives a mean of two. At the boundary prime eleven, all ten bins are singletons. Every nonidentity multiplier is deranging and there is no remaining set to average. The mean requires p>b+1p>b+1p>b+1.

We can evaluate the sum from just the bin sizes. Divide p−1p-1p−1 by bbb, writing p−1=bQ+Rp-1=bQ+Rp−1=bQ+R. Then RRR bins contain Q+1Q+1Q+1 residues and the other b−Rb-Rb−R contain QQQ. Substitution gives

C‾=Q(b(Q−1)+2R)b(Q−1)+R.\overline C=\frac{Q\bigl(b(Q-1)+2R\bigr)}{b(Q-1)+R}.C=b(Q−1)+RQ(b(Q−1)+2R)​.

For prime 29 in base ten, eight bins hold three residues and two hold two. They supply 8×6+2×2=528\times6+2\times2=528×6+2×2=52 matches. There are 18 nonidentity multipliers outside the zero set, so the mean is 52/18=26/952/18=26/952/18=26/9.

At thirteen, seventeen and nineteen, the mean is still exactly two. More generally, that value holds throughout b+1<p≤2b+1b+1<p\leq2b+1b+1<p≤2b+1. When the residues divide evenly among the bins, the mean is exactly their common size QQQ.

The sum does not tell us how each individual multiplier will behave. It tells us exactly how many matches they have to share.

Nine, with room to spare

At thirteen, the two crowded bins leave only four matches to distribute. Once the prime is greater than twice the base, every bin is crowded. Many more multipliers preserve a digit somewhere in the table.

But nine still preserve none. We can name them before making a single comparison, by reducing the same nine fractions modulo the chosen prime. Their inverse pairs survive, and the complement remains at the center.

The base fixes the width of the gate. The prime fills in what happens beyond it.

Companion paper: Bin Derangements and the Gate Width Theorem →
Share

Comments

Sign in to join the discussion.

← Previous: Phase-Filtered Ramanujan Sums and the Spectral Gate
Next: The Character Structure of the Collision Fluctuation →