Petty’s Notebook

Digit-Partitioning Primes and the Alignment Formula

About this paperRepository PDFZenodo
Cite this paper

A. S. Petty, Digit-Partitioning Primes and the Alignment Formula, DOI: 10.5281/zenodo.21844074.

Lean proofs

Abstract

A repeating digit records a remainder state, but it need not identify that state. For a prime pp not dividing a positional base bb, we prove that the digit map is injective on the nonzero remainders exactly when p≤b+1p\le b+1. In this range, two synchronized periodic tails either agree at every position or disagree at every position, even when the remainders belong to several cycles.

Let n=pmn=pm, where every prime factor of mm divides bb. Compare all proper fractions k/nk/n with 1/n1/n after one common depth that clears mm, giving each terminating fraction score one. For every digit-partitioning prime, the mean alignment is αb(pm)=2m−1pm−1.\alpha_b(pm)=\frac{2m-1}{pm-1}. The cycle lengths and the number of cycles disappear from this count. In base ten, the same formula covers the fixed repetends at 33, the full cycle at 77, and the complement pairs at 1111. The boundary p≤b+1p\le b+1 identifies exactly when digit agreement recovers equality of remainder states and the alignment reduces to counting complete matches.

April 2020 (revised September 2026)
2020 Mathematics Subject Classification: 11A63, 11B83

The Boundary of Digit Separation

In base ten, the ten proper fractions k/11k/11 use every decimal digit exactly once at each position of their repetends. The twelve proper fractions k/13k/13 cannot do this. Their leading digits repeat 33 and 66, since twelve nonzero remainder states must enter ten digit bins. At 1111, observing a digit identifies its remainder. At 1313, a shared digit can come from two different states.

This change determines how the fraction table can be counted. Long division advances remainders by a permutation. If different states write different digits at one position, they remain separate at every position. Synchronized periodic tails therefore give complete agreement or none. Once distinct states can write the same digit, partial agreement becomes possible.

For every prime p∤bp\nmid b, the exact boundary is p≤b+1p\le b+1. Let n=pmn=pm with mm supported on the prime factors of bb, and compare every proper fraction with 1/n1/n after a common division depth that clears mm. In the injective range, the m−1m-1 terminating rows receive score one, exactly mm nonterminating rows match throughout, and every other row disagrees throughout. Thus αb(pm)=2m−1pm−1.\alpha_b(pm)=\frac{2m-1}{pm-1}. The decimal cases p=3p=3, p=7p=7, and p=11p=11 have fixed states, one cycle of six, and five complement pairs respectively. Their repeating patterns differ, but the alignment requires the same count. The lengths and arrangement of the cycles are unnecessary once the digit map distinguishes their states.

Coordinatewise agreement under cyclic shift is classical Hamming correlation [1]. Kak and Chatterjee study this observable for full-period reciprocal digit sequences, including complement structure and Hamming-distance and autocorrelation bounds [2]. Repetend multiplication, varying bases, and Midy-type complement phenomena are also established [3, 4]. The sharp digit boundary and the resulting count concern the complete denominator table. They do not require the base to generate the unit group modulo pp.

The one-digit alignment at prime 33 [5] is one case of this common mechanism. The limit 2/p2/p selects 33 as the only prime p≥3p\ge3 in the digit-partitioning class that can cross the reciprocal golden threshold. The case is available whenever 3∤b3\nmid b. The injectivity boundary establishes how far the same count applies before distinct remainder states can contribute partial matches.

Setting

Let b≥2b \ge 2 be a positional base and pp a prime not dividing bb. The multiplicative order L=ordp(b)L = \mathop{\mathrm{ord}}_p(b) is the length of the repetend of 1/p1/p in base bb [8]. The group (Z/pZ)∗(\mathbb{Z}/p\mathbb{Z})^{*} has order p−1p - 1, and the cyclic subgroup ⟨b⟩\langle b \rangle has order LL, partitioning {1,…,p−1}\{1, \ldots, p-1\} into (p−1)/L(p-1)/L cosets. Within each coset, the repetends of k/pk/p are cyclic permutations of a common string.

Definition 1 (Base-supported integers). A positive integer mm is bb-supported if every prime factor of mm divides bb. Equivalently, mm divides some power of bb.

Definition 2 (Synchronized repetend alignment). For n=pmn = pm with mm a bb-supported integer, the repetend alignment αb(n)\alpha_b(n) is defined at a common division depth. Choose t≥0t\ge0 with m∣btm\mid b^t. Beginning immediately after the first tt base-bb digits, compare the next L=ordp(b)L=\mathop{\mathrm{ord}}_p(b) digits of k/nk/n with the corresponding digits of 1/n1/n. For a terminating fraction, set ab(k/n,1/n)=1a_b(k/n,1/n)=1. Otherwise, let ab(k/n,1/n)a_b(k/n,1/n) be the fraction of the LL synchronized positions at which the two digits agree. Then αb(n)\alpha_b(n) is the mean of these scores over k∈{1,…,n−1}k \in \{1, \ldots, n-1\}.

After depth tt, every nonterminating tail has reduced denominator pp and period LL. The definition does not depend on the choice of tt. Replacing tt by a larger clearing depth advances both nonterminating tails by the same power of bb, so it rotates both length-LL words together and leaves their position-wise match proportion unchanged.

Remark 3 (Common division depth). We compare every fraction at the same long-division depth. We do not restart each fraction when its own shortest prefix ends. That phase reset defines a different statistic. The common-depth convention reads every floor evaluation at the same position. For example, in base 22, 16=0.001‾2,13=0.01‾2,23=0.10‾2.\frac16=0.0\overline{01}_2,\qquad \frac13=0.\overline{01}_2,\qquad \frac23=0.\overline{10}_2. Resetting the repeating blocks makes 1/61/6 match 1/31/3. Reading all three fractions after one common digit makes 1/61/6 match 2/32/3 instead.

The Digit Function

One step of long division turns a remainder into a digit and a new remainder. The next function records the digit.

Definition 4 (Digit function). For a prime pp not dividing bb, the digit function is δ(r)  =  ⌊brp⌋,r∈{0,1,…,p−1}.\delta(r) \;=\; \left\lfloor \frac{br}{p} \right\rfloor, \qquad r \in \{0, 1, \ldots, p-1\}. The floor function partitions {1,…,p−1}\{1, \ldots, p-1\} into contiguous bins of nearly equal size [6].

Lemma 5 (Digit-function injectivity). If p≤b+1p \le b + 1, then δ\delta is injective on {1,…,p−1}\{1, \ldots, p-1\}.

Proof. Two cases.

Case p=b+1p = b + 1. For r∈{1,…,b}r \in \{1, \ldots, b\}, δ(r)  =  ⌊brb+1⌋  =  ⌊r−rb+1⌋  =  r−1,\delta(r) \;=\; \left\lfloor \frac{br}{b+1} \right\rfloor \;=\; \left\lfloor r - \frac{r}{b+1} \right\rfloor \;=\; r - 1, since 0<r/(b+1)<10 < r/(b+1) < 1 for 1≤r≤b1 \le r \le b. The map r↦r−1r \mapsto r - 1 is a bijection from {1,…,b}\{1, \ldots, b\} to {0,…,b−1}\{0, \ldots, b-1\}.

Case p≤bp \le b. For distinct r,s∈{1,…,p−1}r, s \in \{1, \ldots, p-1\} with r<sr<s, we have s−r≥1s-r\ge1. Coprimality rules out b=pb=p, so p≤bp\le b actually gives b>pb>p. Therefore bsp−brp=b(s−r)p≥bp>1.\frac{bs}{p}-\frac{br}{p} =\frac{b(s-r)}p \ge\frac bp>1. The two quantities before flooring are separated by more than one, so their floors are strictly ordered. ◻

Remark 6. When p>b+1p > b + 1, the function δ\delta maps p−1>bp - 1 > b distinct remainders into bb digit values. By the pigeonhole principle [7], δ\delta cannot be injective.

The Digit-Partitioning Property

Definition 7 (Digit-partitioning primes). A prime pp is digit-partitioning in base bb if, for every pair of distinct numerators k,ℓ∈{1,…,p−1}k,\ell\in\{1,\ldots,p-1\}, the base-bb expansions of k/pk/p and ℓ/p\ell/p have different digits at every common position. Positions are phase-aligned from the radix point. A nontrivial cyclic rotation is therefore a different repetend phase, not an identical repetend.

Theorem 8 (Digit-partitioning characterization). A prime pp not dividing bb is digit-partitioning in base bb if and only if p≤b+1p \le b + 1.

Proof. At position j∈{0,…,L−1}j\in\{0,\ldots,L-1\} of the repetend of k/pk/p, the digit is δ(bjk mod p)\delta(b^{j} k \bmod p). For distinct fractions k/pk/p and ℓ/p\ell/p with k≢ℓ(modp)k \not\equiv \ell \pmod p, the arguments bjkb^{j} k and bjℓb^{j} \ell are distinct modulo pp, since bjb^{j} is invertible.

If p≤b+1p \le b + 1, Lemma 5 makes δ\delta injective on {1,…,p−1}\{1, \ldots, p-1\}, so distinct arguments produce distinct digits at every position. Hence pp is digit-partitioning.

If p>b+1p > b + 1, then δ\delta maps p−1>bp - 1 > b remainders into bb values, and the pigeonhole principle yields distinct r,s∈{1,…,p−1}r, s \in \{1, \ldots, p-1\} with δ(r)=δ(s)\delta(r) = \delta(s). The first repetend digits of r/pr/p and s/ps/p agree. Thus pp is not digit-partitioning. ◻

The Alignment Formula

Proposition 9 (Multiplicative cycle partition). Let n=pmn = pm with mm a bb-supported integer and p∤bp \nmid b. The non-terminating fractions in {k/n:1≤k≤n−1}\{k/n : 1 \le k \le n-1\} partition into (p−1)/L(p-1)/L families of mLmL fractions each, where L=ordp(b)L = \mathop{\mathrm{ord}}_p(b). Every synchronized repetend has length LL. Within each family the repetends are cyclic shifts of one another; repetends from different families are not cyclic shifts.

Proof. The nonzero multiples of pp are p,2p,…,(m−1)pp,2p,\ldots,(m-1)p. Their reduced denominators divide mm, so they terminate. If p∤kp\nmid k, the reduced denominator still has the factor pp and the expansion does not terminate. Thus there are m−1m-1 terminating fractions and (p−1)m(p-1)m nonterminating ones.

Choose tt with m∣btm \mid b^{t} and write bt=mub^{t} = mu, where gcd⁡(u,p)=1\gcd(u, p) = 1 since mm is bb-supported and p∤bp \nmid b. Then kpm  =  kup⋅bt.\frac{k}{pm} \;=\; \frac{ku}{p \cdot b^{t}}. After the common clearing depth tt, the periodic tail is generated by the nonzero residue ku mod pku\bmod p. Multiplication by uu permutes the nonzero residues. Each nonzero residue class modulo pp has exactly mm representatives in {1,…,pm−1}\{1,\ldots,pm-1\}. Thus each fixed starting phase occurs exactly mm times; a full orbit of LL phases occurs mLmL times.

Starting from any nonzero residue rr, the remainder returns to rr after qq digits exactly when bqr≡r(modp)b^qr\equiv r\pmod p. Since rr is invertible, this is equivalent to bq≡1(modp)b^q\equiv1\pmod p. A repeating block of length qq represents a rational whose reduced denominator divides bq−1b^q-1. Since the tail has reduced denominator pp, a shorter block would force p∣bq−1p\mid b^q-1, and hence an earlier return. Every nonterminating tail therefore has least period L=ordp(b)L=\mathop{\mathrm{ord}}_p(b).

The residues 1,…,p−11, \ldots, p-1 partition into (p−1)/L(p-1)/L cosets of ⟨b⟩\langle b \rangle in (Z/pZ)∗(\mathbb{Z}/p\mathbb{Z})^{*}. Residues in the same coset produce cyclic shifts of a single repetend; residues in different cosets produce distinct repetends, since their orbits under multiplication by bb are disjoint. A coset has LL residues, and every residue occurs mm times. Hence each family has mLmL fractions. ◻

Theorem 10 (Exact alignment formula). If p∤bp\nmid b is prime, p≤b+1p \le b + 1, and m≥1m \ge 1 is bb-supported, then αb(pm)  =  2m−1pm−1.\alpha_b(pm) \;=\; \frac{2m - 1}{pm - 1}.

Proof. Choose tt with m∣btm\mid b^t and put u=bt/mu=b^t/m. At synchronized position j∈{0,…,L−1}j\in\{0,\ldots,L-1\}, the reference tail has remainder rj≡bju(modp),r_j\equiv b^ju\pmod p, while the tail of k/(pm)k/(pm) has remainder krj(modp)kr_j\pmod p. The remainder rjr_j is nonzero. Therefore the two remainders agree if and only if k≡1(modp)k\equiv1\pmod p.

If k≡1(modp)k\equiv1\pmod p, every synchronized digit agrees with the reference. If k≢0,1(modp)k\not\equiv0,1\pmod p, the two remainders are distinct at every synchronized position. Lemma 5 makes the digit function injective, so none of their digits agree, whether the two phases lie in different cosets or in the same one.

The count now splits into three cases.

  1. The m−1m - 1 terminating fractions (multiples of pp). Each contributes alignment 11.

  2. The mm numerators 1,1+p,…,1+(m−1)p1,1+p,\ldots,1+(m-1)p, all congruent to 11 modulo pp. Each contributes alignment 11.

  3. The remaining (p−2)m(p-2)m non-terminating fractions. Each contributes alignment 00.

Thus exactly (m−1)+m=2m−1(m-1)+m=2m-1 of the pm−1pm-1 fractions are aligned. ◻

Corollary 11 (Alignment limit). For fixed digit-partitioning pp, the alignment αb(pm)→2/p\alpha_b(pm) \to 2/p as m→∞m \to \infty through bb-supported integers.

Enumeration

The digit-partitioning primes in base bb are precisely the primes p≤b+1p \le b + 1 that do not divide bb.

Digit-partitioning primes for selected bases, with their alignment limits 2/p2/p.
Base bb Digit-part. primes Alignment limits 2/p2/p
44 3,53, 5 0.667,  0.4000.667,\; 0.400
66 5,75, 7 0.400,  0.2860.400,\; 0.286
88 3,5,73, 5, 7 0.667,  0.400,  0.2860.667,\; 0.400,\; 0.286
1010 3,7,113, 7, 11 0.667,  0.286,  0.1820.667,\; 0.286,\; 0.182
1212 5,7,11,135, 7, 11, 13 0.400,  0.286,  0.182,  0.1540.400,\; 0.286,\; 0.182,\; 0.154
1616 3,5,7,11,13,173, 5, 7, 11, 13, 17 0.667,  …,  0.1180.667,\; \ldots,\; 0.118

The class of digit-partitioning primes depends on bb. The alignment formula (2m−1)/(pm−1)(2m-1)/(pm-1) is uniform. It makes no reference to the base, to the order LL, or to any of the mechanism-specific structure described below.

In base 1010, the three digit-partitioning primes arise in structurally distinct ways. For p=3p = 3, ord3(10)=1\mathop{\mathrm{ord}}_3(10) = 1, so repetends are single digits. For p=7p = 7, ord7(10)=6=p−1\mathop{\mathrm{ord}}_7(10) = 6 = p-1, so 1010 is a primitive root and the repetend is a cyclic number with all distinct digits. For p=11p = 11, ord11(10)=2\mathop{\mathrm{ord}}_{11}(10) = 2 with 10≡−1(mod11)10 \equiv -1 \pmod{11}, so repetends form nines-complement pairs.

These three mechanisms are unified by the single condition p≤b+1p \le b+1 and the injectivity of δ\delta.

The Golden Threshold in the Digit-Partitioning Class

Write φ=(1+5)/2\varphi=(1+\sqrt{5})/2 for the golden ratio. Corollary 11 gives the alignment limit αb(pm)→2/p\alpha_b(pm) \to 2/p for every digit-partitioning prime. The golden threshold 1/φ1/\varphi therefore selects, within this class, precisely those primes for which 2/p>1/φ2/p > 1/\varphi, i.e. p<2φ≈3.236p < 2\varphi \approx 3.236. Among primes p≥3p \ge 3, only p=3p = 3 satisfies this. It belongs to the class whenever 3∤b3\nmid b; if 3∣b3\mid b, no admissible prime p≥3p\ge3 crosses the threshold. The prime 22 is the familiar degenerate exception when the base is odd.

Why the Golden Ratio Selects the Prime Three [5] studies the golden threshold in the one-digit regime. The digit boundary places that regime inside a larger collision-free class. The same boundary p≤b+1p\le b+1 is present in every base.

The Digit Boundary

At p=b+1p=b+1, every possible digit is used and still identifies one nonzero remainder. This is the last prime size at which the digit map can do so. Since b≡−1(modp)b\equiv-1\pmod p, the remainder cycles are complement pairs. In decimal, the five pairs at 1111 occupy all ten digit values without sharing a position.

The same count applies to the six-cycle at 77 and the fixed repetends at 33. A matching digit identifies a matching remainder, and division carries that equality through the whole period. Different states cannot acquire an isolated match. Cycle shape is visible in the digits, but the alignment can be counted without reconstructing it.

At 1313, the distinction is visible in two fractions, 113=0.076923‾,1113=0.846153‾.\begin{aligned} \frac{1}{13}&=0.\overline{076923},\\ \frac{11}{13}&=0.\overline{846153}. \end{aligned} Their digits agree in the third and sixth positions, giving score 1/31/3, although their remainder states remain different throughout. A shared digit no longer forces a shared trajectory. The exact formula (2m−1)/(pm−1)(2m-1)/(pm-1) has reached its natural boundary because it counts complete matches and cannot include this partial agreement.

The threshold p≤b+1p\le b+1 specifies how much of the remainder dynamics a single digit reveals. Within it, that digit distinguishes all nonzero states. Beyond it, agreement can be temporary, and the repeating block carries information that no single digit can supply.

References

[1]A. Lempel and H. Greenberger, Families of sequences with optimal Hamming-correlation properties, IEEE Trans. Inform. Theory 20 (1974), no. 1, 90–94. https://doi.org/10.1109/TIT.1974.1055169.

[2]S. C. Kak and A. Chatterjee, On decimal sequences, IEEE Trans. Inform. Theory 27 (1981), no. 5, 647–652. https://doi.org/10.1109/TIT.1981.1056394.

[3]N. J. Armstrong and R. J. Armstrong, Some properties of repetends, Math. Gaz. 87 (2003), no. 510, 437–443. https://doi.org/10.1017/S0025557200173619.

[4]J. Lewittes, Midy's theorem for periodic decimals, Integers 7 (2007), Paper A02, 11 pp. https://eudml.org/doc/127778.

[5]A. S. Petty, Why the Golden Ratio Selects the Prime Three, research note, January 2020 (revised September 2026). DOI: https://doi.org/10.5281/zenodo.20399951.

[6]A. S. Fraenkel, The bracket function and complementary sets of integers, Canad. J. Math. 21 (1969), 6–27.

[7]R. P. Stanley, Enumerative Combinatorics, vol. 1, 2nd ed., Cambridge University Press, 2012.

[8]G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, 6th ed., Oxford University Press, 2008.