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

Digit-Partitioning Primes and the Alignment Formula

April 3, 202018 min read
Companion paper: Digit-Partitioning Primes and the Alignment 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.

Write the ten proper fractions of eleven in a column. Every decimal place contains all ten digits, each used once.

The first column runs from zero to nine. The second runs back from nine to zero. Then the two columns repeat. You can continue the division for a thousand places without finding two rows that share a digit in the same column.

All ten proper elevenths through four decimal places. Each column contains every decimal digit once. The ascending and descending columns repeat. All ten proper elevenths through four decimal places. Each column contains every decimal digit once. The ascending and descending columns repeat.
The ten rows stay separate at every position. Gold and teal distinguish the alternating columns.

Thirteen cannot keep this arrangement. It has twelve proper fractions and only ten decimal digits. Read their first digits in numerator order and you get

0, 1, 2, 3, 3, 4, 5, 6, 6, 7, 8, 9.0,\ 1,\ 2,\ 3,\ 3,\ 4,\ 5,\ 6,\ 6,\ 7,\ 8,\ 9.0, 1, 2, 3, 3, 4, 5, 6, 6, 7, 8, 9.

Three and six each appear twice. The failure is already visible before the repeating blocks have had a chance to do anything elaborate.

In Three and the Golden Ratio, the fractions of twelve fall into three groups, and their count gives an alignment of seven elevenths. The question here is how far that count travels. Seven has a six-digit cycle. Eleven has five separate pairs. Neither looks much like the single repeating digits at three.

One step of long division explains the property they share.

A digit for each remainder

Long division carries a remainder from one column to the next. Multiply it by the base, divide by the denominator, write the whole-number quotient as the next digit, and carry the new remainder forward.

For a prime denominator ppp in base bbb, the digit written from remainder rrr is

δ(r)=⌊brp⌋.\delta(r)=\left\lfloor\frac{br}{p}\right\rfloor.δ(r)=⌊pbr​⌋.

The floor brackets mean the whole-number part. In decimal, remainder 4 at denominator 11 gives 40=3⋅11+740=3\cdot11+740=3⋅11+7. The digit is 3 and the next remainder is 7. That gives 70=6⋅11+470=6\cdot11+470=6⋅11+4. The digit is 6, and we are back at remainder 4. Hence 4/11=0.363636…4/11=0.363636\ldots4/11=0.363636….

Each possible digit collects the remainders that produce it. Call that collection a digit bin. The next drawing puts the actual remainder numbers inside the bins, so we can see both the assignment and the first failure of separation.

Digit bins for primes 3, 7, 11, and 13 in base ten, labeled with their remainder states. At 13, states 4 and 5 share digit 3, and states 8 and 9 share digit 6. Digit bins for primes 3, 7, 11, and 13 in base ten, labeled with their remainder states. At 13, states 4 and 5 share digit 3, and states 8 and 9 share digit 6.
Digits run across the top; the numbers inside each box are remainders. Red boxes contain two states that write the same digit.

At 3, the two nonzero remainders produce digits 3 and 6. At 7, six remainders produce six different digits. At 11, every digit has exactly one remainder. At 13, remainders 4 and 5 both produce digit 3, while remainders 8 and 9 both produce digit 6.

The boundary has a short proof. If p<bp<bp<b, increasing the remainder by one increases br/pbr/pbr/p by more than one. Its whole-number part must increase too. Different remainders therefore give different digits.

There is one more possible endpoint. When p=b+1p=b+1p=b+1,

δ(r)=⌊r−rb+1⌋=r−1.\delta(r)=\left\lfloor r-\frac{r}{b+1}\right\rfloor=r-1.δ(r)=⌊r−b+1r​⌋=r−1.

That is exactly the first column of the table of elevenths. Every remainder gets its own digit, with no gaps. Above this endpoint, the p−1p-1p−1 nonzero remainders outnumber the bbb digits, so sharing is unavoidable.

Among primes that do not divide the base, different remainders produce different digits precisely when

p≤b+1.p\leq b+1.p≤b+1.

I call these primes digit-partitioning. In decimal they are 3, 7, and 11. Two and five divide the base and give terminating expansions, so they are excluded.

Now advance every row by one place. Multiplication by the base permutes the nonzero remainders modulo ppp. Distinct states remain distinct. If the digit function separates them now, it separates them after the next step, and after every step that follows. The whole infinite decimal inherits the separation from this single local rule.

Three different cycles

At three, each nonzero remainder returns to itself after one step. The digits are the familiar repeating 3 and repeating 6.

Seven takes the longer way around. Its six remainders form one cycle, and the digits read

1→4→2→8→5→7→1.1\to4\to2\to8\to5\to7\to1.1→4→2→8→5→7→1.

The fractions 1/71/71/7 through 6/76/76/7 enter that cycle at different places. Their repeating blocks are the six rotations of 142857. Read down any common column and the six digits are different.

Eleven breaks into five pairs. Since ten is one less than eleven, multiplying a remainder by ten sends it to its complement, 11−r11-r11−r. The next step brings it back. The digits pair as 0 with 9, 1 with 8, and so on. Every pair sums to nine.

Decimal remainder cycles labeled by the digits they emit. Three has fixed digits 3 and 6. Seven cycles through 142857. Eleven has five complement pairs, each summing to nine. Decimal remainder cycles labeled by the digits they emit. Three has fixed digits 3 and 6. Seven cycles through 142857. Eleven has five complement pairs, each summing to nine.
Each node is a remainder state labeled with its emitted digit. Arrows advance one place of long division. The distinct labels make the same alignment count possible in all three cases.

Two fixed states, one cycle of six, five cycles of two. The geometry changes completely. Yet in every case, knowing the digit tells us which nonzero remainder produced it. That is the property the alignment count needs.

The complete decimal tables

The bars enclose the shortest repeating block. For example, “|09|” means “090909…”. Repeating several copies inside the bars does not change the decimal or its shortest period.

Thirds

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

Sevenths

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

Elevenths

 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|

Thirteenths

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

Seven rows, three denominators

Return to the fractions of twelve. After two decimal places, three rows have terminated, four repeat the reference digit 3, and four repeat 6. A terminating row receives a score of 1 by definition. A repeating row receives the proportion of positions that agree with the reference. The average is therefore (3+4)/11=7/11(3+4)/11=7/11(3+4)/11=7/11.

Keep the factor four, but replace three by seven. We now have denominator 28 and twenty-seven fractions to compare with 1/281/281/28.

The three terminating rows are 7/287/287/28, 14/2814/2814/28, and 21/2821/2821/28. Four more rows match the reference tail after the second decimal place.

 1/28 = 0.03|571428|
 8/28 = 0.28|571428|
15/28 = 0.53|571428|
22/28 = 0.78|571428|

The remaining twenty rows disagree with the reference at every position. Some carry other rotations of the same six-digit block. A rotation is enough to make them different here. We compare the digits in the same column, without sliding one row against another to improve the fit.

There are still seven credited rows, now among twenty-seven. The score is 7/277/277/27.

At denominator 44, the count is seven among forty-three. Three rows terminate, four match the reference, and thirty-six disagree throughout. Eleven’s five separate cycles require no extra term in the formula.

Exact aligned-row counts for denominators 12, 28, and 44 after two decimal places. Each has three terminating rows and four matching rows. The remaining row counts are 4, 20, and 36, giving scores 7/11, 7/27, and 7/43. Exact aligned-row counts for denominators 12, 28, and 44 after two decimal places. Each has three terminating rows and four matching rows. The remaining row counts are 4, 20, and 36, giving scores 7/11, 7/27, and 7/43.
Teal marks the three terminating rows, gold the four complete matches, and gray the rows that disagree throughout. All three bars use the same scale.
A one-column phase shift

The shared starting column is essential. In base two, the shortest repeating blocks of 1/61/61/6 and 1/31/31/3 are both “01”. But their prefixes have different lengths.

1/6 = 0.001010101…
1/3 = 0.010101010…
2/3 = 0.101010101…

Begin all three comparisons after the first binary digit. The tails of 1/61/61/6 and 2/32/32/3 agree, while the tail of 1/31/31/3 is out of phase. Restarting each fraction at the end of its own shortest prefix gives a different comparison.

Moving every row forward by the same number of additional places is harmless. It rotates both repeating words together and preserves their proportion of matching positions.

The count in general

Write the denominator as pmpmpm, where ppp is digit-partitioning and mmm divides some power of the base. In decimal, mmm may contain twos and fives, or be 1. These are the factors that enough steps of long division can clear away.

Start every comparison after a common number of places that clears mmm. The repeating tails then have denominator ppp, and the numerator’s class modulo ppp determines its starting state relative to the reference.

The multiples of ppp terminate. There are m−1m-1m−1 of them. The numerators one greater than a multiple of ppp match the reference throughout. There are mmm of those. Every other numerator gives a different remainder at every common position, and the digit function makes every resulting digit different too.

Numerator class Rows Score per row
Multiples of ppp m−1m-1m−1 1 by the termination convention
One more than a multiple of ppp mmm 1 from complete agreement
All remaining classes (p−2)m(p-2)m(p−2)m 0 from complete disagreement

Average over all pm−1pm-1pm−1 proper fractions and the alignment is

αb(pm)=(m−1)+mpm−1=2m−1pm−1.\alpha_b(pm)=\frac{(m-1)+m}{pm-1} =\frac{2m-1}{pm-1}.αb​(pm)=pm−1(m−1)+m​=pm−12m−1​.

No cycle length appears. No count of separate cycles appears. We can leave those details out because distinct remainder states never become indistinguishable at the digit level.

The base determines which primes qualify and which factors mmm it can clear. Once those conditions hold, the count is the same.

Base Digit-partitioning primes
6 5, 7
10 3, 7, 11
16 3, 5, 7, 11, 13, 17

At a prime endpoint p=b+1p=b+1p=b+1, the complement pairs return as well. Their digits sum to five in base six and fifteen in base sixteen, just as they sum to nine in decimal.

Three keeps its place

As mmm grows through values supported by the base, the alignment approaches 2/p2/p2/p. For primes at least three, the finite scores lie below that limit. Exceeding the golden threshold within the digit-partitioning class therefore requires

2p>1φ,p<2φ≈3.236,\frac{2}{p}>\frac{1}{\varphi}, \qquad p<2\varphi\approx3.236,p2​>φ1​,p<2φ≈3.236,

where φ=(1+5)/2\varphi=(1+\sqrt5)/2φ=(1+5​)/2.

Only three qualifies. Its limit is two thirds. Seven tends to two sevenths, eleven to two elevenths. The drawing with seven credited rows gives a finite view of the same arithmetic. The numerator stays put while the whole table grows around it.

Three belongs to the class whenever it does not divide the base. If the base is divisible by three, this case is absent. Odd bases also admit the exceptional prime two, whose alignment is always 1.

Three’s single repeating digits belong to a larger family. The digit boundary explains why the same count also works for much longer words. The golden comparison survives that enlargement.

Repetends and related work

These decimals have a substantial history. The paper places its result alongside Armstrong and Armstrong’s work on repetends, Lewittes’s treatment of Midy’s theorem, Lempel and Greenberger’s Hamming-correlation framework, and Kak and Chatterjee’s work on decimal sequences.

The claim here joins the exact boundary p≤b+1p\leq b+1p≤b+1 to the count over every proper fraction with denominator pmpmpm. It does not require all the nonzero remainders to lie in a single cycle. The five separate pairs at eleven are included on the same terms as the full cycle at seven.

Two shared digits at thirteen

Compare two rows from the table of thirteenths.

113=0.076923‾,1113=0.846153‾.\frac{1}{13}=0.\overline{076923}, \qquad \frac{11}{13}=0.\overline{846153}.131​=0.076923,1311​=0.846153.

The third digits are both 6. The sixth digits are both 3. This pair agrees in two of its six positions and repeats that pattern indefinitely. Its score is one third.

The six repeating digits of 1/13 and 11/13 agree in places three and six, giving score one third. Their remainder states before each digit remain different in all six places. The six repeating digits of 1/13 and 11/13 agree in places three and six, giving score one third. Their remainder states before each digit remain different in all six places.
Gold marks the two shared digits. The remainder rows underneath never agree. Matching digits no longer identify matching states.

This is the first decimal prime beyond the boundary. Distinct fractions still have different remainder states at every step. But different states can now write the same digit. Complete agreement and complete disagreement no longer exhaust the possibilities.

The formula’s proof fails at a precise place. We can still count the terminating rows and the rows that follow the reference exactly. We can no longer assign zero to everything else. The partially matching rows contribute too.

Earlier bin and collision drawings

The original overview extends the remainder-to-digit assignment through 23. The first three primes have at most one remainder per occupied bin. Shared bins appear at 13 and become more numerous as the prime grows.

Original diagram of remainder assignments to decimal digit bins for primes 3, 7, 11, 13, 17, and 23.
The earlier overview follows the assignment from separate states to shared digit bins. Open it to inspect the full drawing.

The second drawing extends the comparison through 499. Its lower chart counts unordered pairs of distinct remainder states that produce the same digit. That total describes the bins as a whole. An alignment score against one chosen reference also depends on the bins visited by that reference’s repeating cycle.

Original digit-bin chart through prime 499, with a lower chart counting unordered pairs of states that emit the same digit.
The earlier survey extends the bin count through 499. The lower chart counts colliding state pairs across the whole set of bins.

That distinction opens the next problem. The bins tell us where digits can agree. The remainder cycles tell us when a particular comparison reaches those bins. Beyond the boundary, the route through the table enters the count.

For now, watch the third place in the drawing. Remainders eight and nine both write a six. One step later, they write a one and a nine. The shared digit lasts one column. The distinction between the remainders survives.

Companion paper: Digit-Partitioning Primes and the Alignment Formula →
Share

Discussion

Sign in to join the discussion.

← All articlesRead the paper →
← Previous: Three and the Golden Ratio
Next: The Alignment Limit for All Primes →