Digit-Partitioning Primes and the Alignment Formula

In base 10, exactly three primes produce total digit separation: 3, 7, and 11. Three different mechanisms, one shared condition, one universal formula.

Digit-Partitioning Primes and the Alignment Formula
The digit function assigns each remainder to a seat. At p = 3, 7, and 11, every remainder has its own. At p = 13, some seats hold two, and collisions begin.

April 2020, revised April 2026

Write out all ten fractions of 11. Read down the columns.

 1/11 => 0.|09|
 2/11 => 0.|18|
 3/11 => 0.|27|
 4/11 => 0.|36|
 5/11 => 0.|45|
 6/11 => 0.|54|
 7/11 => 0.|63|
 8/11 => 0.|72|
 9/11 => 0.|81|
10/11 => 0.|90|

Ten fractions. Ten two-digit blocks. Every digit appears exactly once in each column. No two fractions share a digit at the same position. The separation is total.

Now try $p = 13$.

 1/13 => 0.|076923|     7/13 => 0.|538461|
 2/13 => 0.|153846|     8/13 => 0.|615384|
 3/13 => 0.|230769|     9/13 => 0.|692307|
 4/13 => 0.|307692|    10/13 => 0.|769230|
 5/13 => 0.|384615|    11/13 => 0.|846153|
 6/13 => 0.|461538|    12/13 => 0.|923076|

Twelve fractions, but only ten possible digits. The leading digits go 0, 1, 2, 3, 3, 4, 5, 6, 6, 7, 8, 9. The digits 3 and 6 each show up twice. The separation is gone.

One inequality draws the line between these two worlds. $p \leq b + 1$. Below it, the remainders fit into the digit bins without crowding. Above it, some bins have to hold more than one. The primes on the clean side I call digit-partitioning. In base 10, there are exactly three of them. 3, 7, and 11.

Three primes, three mechanisms

Each of the three is clean for a completely different reason.

Start with 3.

1/3 => 0.|3|
2/3 => 0.|6|

Two fractions. Two single-digit repetends. 3 and 6. There is nothing to collide with.

Now 7.

1/7 => 0.|142857|
2/7 => 0.|285714|
3/7 => 0.|428571|
4/7 => 0.|571428|
5/7 => 0.|714285|
6/7 => 0.|857142|

Read the columns instead of the rows. Every column contains six different digits. Six fractions, six positions, six different choices at every position. Six remainders looking for seats, and room for all of them.

And there is something else going on here. Take 142857 and multiply it by 2. You get 285714. By 3, 428571. By 4, 571428. The same six digits, rearranged, every time. This number has appeared in recreational math books for over a century, usually presented as a curiosity and left unexplained. But the explanation is simple. Each multiplication corresponds to a different fraction of 7. Each fraction's repetend is a rotation of the same string. The rotations never collide because six remainders fit into ten seats without sharing. The cyclic structure comes from the multiplicative order of 10 modulo 7. The separation is forced by $7 \leq 10 + 1$.

Now 11.

 1/11 => 0.|09|
 2/11 => 0.|18|
 3/11 => 0.|27|
 4/11 => 0.|36|
 5/11 => 0.|45|
 6/11 => 0.|54|
 7/11 => 0.|63|
 8/11 => 0.|72|
 9/11 => 0.|81|
10/11 => 0.|90|

Read down the first column. 0, 1, 2, 3, 4, 5, 6, 7, 8, 9. Every digit exactly once. Read down the second column. 9, 8, 7, 6, 5, 4, 3, 2, 1, 0. The same digits in reverse.

In base 10, $10 \equiv -1 \pmod{11}$. Multiplying a remainder by 10 is the same as negating it. The digit function forces each pair of digits to sum to 9.

$$\lfloor 10r/11 \rfloor + \lfloor 10(11{-}r)/11 \rfloor = 9$$

09 becomes 90. 18 becomes 81. 27 becomes 72. Every fraction paired with its complement, the outward path and its mirror. The same $k \leftrightarrow n{-}k$ symmetry that runs through the early arithmetic notes, now showing up inside the repetend structure of a single prime. This complement pairing turns out to be one of the most important structures in the entire program. It persists past the digit-partitioning primes, into the collision table, where it becomes the antisymmetry that powers the cancellation across all primes.

Single digits. Full cycles. Complement pairs. Three different structures, one shared property. The condition $p \leq b + 1$ does not care how the separation happens. It cares only whether there are enough seats.

One formula

Three primes, three mechanisms, one formula.

$$\alpha(pm) = \frac{2m - 1}{pm - 1}$$

Here $m$ is a $b$-smooth integer, built from the base's own prime factors. The formula holds at $p = 3$, at $p = 7$, and at $p = 11$. No correction terms, no special cases. As $m$ grows, the alignment approaches $2/p$.

The three mechanisms could not look more different from each other. But the alignment formula does not see the mechanism. It sees only whether the digits separate. One number measures all three.

The golden ratio, again

The alignment limit is $2/p$. For this to exceed the golden threshold $1/\varphi \approx 0.618$, the prime must satisfy $p < 2\varphi \approx 3.236$. Among primes, only 2 and 3 qualify, and $p = 2$ is trivial.

At $p = 3$, the limit is $2/3 \approx 0.667$. Above the line. At $p = 7$, $2/7 \approx 0.286$. Below. At $p = 11$, $2/11 \approx 0.182$. Further below. The crossing happens between 3 and 5, and no prime can land in that gap.

The digit-partitioning class contains the entire golden tier in one prime. The other two, clean as they are internally, fall on the wrong side of $1/\varphi$. The class and the threshold are not the same thing. The threshold cuts through the class.

The last seat

The digit function assigns each remainder to a seat. Think of the digits 0 through 9 as ten chairs in a row. Each prime sends $p - 1$ remainders into the room looking for somewhere to sit. The digit function decides who sits where.

At $p = 3$, two remainders walk in. Ten chairs. Plenty of room. At $p = 7$, six walk in. Still comfortable. At $p = 11$, ten walk in. Every chair taken. No one standing.

The digit function sorts remainders into seats

That is the last seat. The prime $p = b + 1$ fills every chair exactly. One more remainder and someone has to double up.

At $p = 13$, twelve remainders, ten chairs. Two chairs hold two. Those are the first collisions. At $p = 17$, more doubling. At $p = 23$, the remainders outnumber the chairs two to one.

Collisions explode

And it never comes back. Every prime larger than 11 has collisions in base 10.

The base sits between two numbers that control everything. Below it, $b - 1$ counts the seats. Above it, $b + 1$ is the last prime where everyone sits. In base 10, that is 9 seats and a last seat at 11.

The collisions past that point land in specific places, governed by the same digit function, and they have structure. That structure is where the program goes next.

Different bases, same formula

Change the base and the clean primes change with it. Base 10 gives you 3, 7, and 11. Base 6 gives you 2, 3, and 5. Base 16 gives you 2, 3, 5, 7, 11, 13, and 17. Different grids, different clean primes. But the alignment formula $(2m-1)/(pm-1)$ is the same in every base. The golden threshold is the same in every base.

Something underneath does not depend on which grid you chose.

The complement symmetry is four centuries old, and repeating decimals have been studied since Leibniz. But nobody had classified primes by whether their remainders fit into the digit bins without sharing, written a single formula that covers all three mechanisms, or noticed that every base sits between two numbers that control everything. As far as I have been able to determine, these observations are new.

What does the prime look like when you stop choosing bases and look at it directly?

Try it yourself

See the three mechanisms. Each one different, each one clean.

./nfield field 3     # single digits. Nothing to collide with.
./nfield field 7     # full cycle. Six different digits in each column.
./nfield field 11    # complement pairs. Digits sum to 9.

Now cross the last seat.

./nfield field 13    # twelve remainders, ten chairs. 3 and 6 double up.
./nfield field 17    # sixteen remainders. More doubles.
./nfield field 23    # twenty-two remainders. The room is crowding.

Now change the base.

./nfield field 7 --base 6    # 7 is the last seat in base 6

Complement pairs again. Digits summing to 5. The same mirror, different base. The last-seat prime $b + 1$ always has this structure, because $b \equiv -1 \pmod{b+1}$ is always true.

./nfield field 17 --base 16   # base 16: complement pairs summing to 15

Code: github.com/alexspetty/nfield


Alexander S. Petty
April 2020 (revised April 2026)
.:.