Petty’s Notebook

The Alignment Limit for All Primes

About this paperRepository PDFZenodo
Cite this paper

A. S. Petty, The Alignment Limit for All Primes, DOI: 10.5281/zenodo.21844294.

Lean proofs

Abstract

Adding factors supported on the base can change the limiting alignment of a prime-denominator family. In base ten, the prime 5353 gives two distinct subsequential limits, 80/68980/689 and 82/68982/689. Let b≥2b\ge2, let p∤bp\nmid b be prime, and let mm be supported on the prime factors of bb. We prove the exact formula αb(pm)=m−1+mT(Cm)/Lpm−1.\alpha_b(pm) = \frac{m - 1 + m T(C_m)/L}{pm - 1}. Here L=ord⁡p(b)L=\operatorname{ord}_p(b), the reference tail follows the coset Cm=u⟨b⟩C_m=u\langle b\rangle with u=bt/mu=b^t/m and m∣btm\mid b^t, and T(Cm)T(C_m) records the digit-bin sizes encountered by that coset. The formula is exact at every finite mm and uses one synchronized division depth for all fractions.

Different cosets can give different subsequential limits. If all cosets have the same normalized bin sum, as they do when bb is a primitive root modulo pp, the limit is (p−1+S)/(p(p−1))(p-1+S)/(p(p-1)), where ndn_d counts the nonzero remainders emitting digit dd and S=∑dnd2S=\sum_d n_d^2.

For every prime p≥5p\ge5 with p∤bp\nmid b, every coset, and every bb-supported mm, we prove the sharp bound αb(pm)<3/5<1/φ\alpha_b(pm)<3/5<1/\varphi, where φ=(1+5)/2\varphi=(1+\sqrt5)/2. The constant 3/53/5 is the optimal uniform supremum. Among primes p≥3p\ge3 not dividing the base, p=3p=3 is the only one that can cross the golden threshold. Denominators supported entirely on the base terminate and have alignment one by definition.

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

One Prime, Two Limits

At p=53p=53 in base ten, synchronized alignment does not settle to one value. An exhaustive enumeration of its four multiplicative cosets gives 80/68980/689 for two cosets and 82/68982/689 for the other two. The gap is small but exact. A single prime therefore carries two subsequential limits.

Splitting becomes possible when the digit function stops being injective. The base-supported part mm creates a finite prefix, then chooses the multiplicative coset followed by the periodic reference tail. Once two remainder states can emit the same digit, different cosets can pass through digit bins of different sizes. The prime alone no longer determines the limit.

Hamming agreement between a reciprocal digit sequence and its cyclic shifts already appears in the communications literature [1]. There is also a mature arithmetic theory for digit values along a single multiplicative orbit. Girstmair relates full-period digit variance to Dedekind sums [3]. His work on class number factors studies sums over selected positions of a full period [2]. Murty and Thangadurai treat digit means when the base need not be a primitive root [4], and Girstmair develops mean and variance formulas for further proper orders [5]. The statistic here averages a digit-equality indicator over the complete denominator ensemble and isolates the remaining coset dependence in T(Cm)T(C_m). A primitive root gives one orbit containing every nonzero remainder, so no choice of coset remains. The contribution proved below is the exact coset formula together with the sharp uniform bound 3/53/5 across all orders and all cosets.

For digit-partitioning primes p∤bp\nmid b, characterized by p≤b+1p\le b+1, Digit-Partitioning Primes and the Alignment Formula [7] proves αb(pm)=2m−1pm−1.\alpha_b(pm)=\frac{2m-1}{pm-1}. Singleton digit bins make every coset indistinguishable in that range. Above the boundary, the same expression remains a lower bound, and the missing contribution depends on the coset selected by mm.

The exact correction is carried by the coset bin sum T(Cm)=∑r∈Cmnδ(r).T(C_m)=\sum_{r\in C_m}n_{\delta(r)}. It records where multiplication by the base meets the interval partition made by the floor function. The resulting formula covers every order and every coset. It also gives the sharp uniform bound 3/53/5 for every prime p≥5p\ge5 that does not divide the base, placing the entire range strictly below the golden threshold.

Synchronized Alignment

Definition 1 (Base-supported integers). An integer m≥1m\ge1 is bb-supported if every prime factor of mm divides bb. Equivalently, mm divides a power of bb.

Definition 2 (Synchronized repetend alignment). Let pp be prime, let mm be bb-supported, and put n=pmn=pm. If p∣bp\mid b, every fraction with denominator nn terminates, and we set αb(n)=1\alpha_b(n)=1. If p∤bp\nmid b, choose one depth tt with m∣btm\mid b^t, and let L=ordp(b)L=\mathop{\mathrm{ord}}_p(b). Beginning immediately after the first tt base-bb digits, compare the next LL digits of every k/nk/n with the corresponding digits of 1/n1/n. A terminating fraction receives score one; otherwise its score is its proportion of matching positions. The mean of these scores over 1≤k<n1\le k<n is the synchronized repetend alignment αb(n)\alpha_b(n).

In the first branch, pmpm is itself bb-supported. In the periodic branch, the definition is independent of the clearing depth. Increasing tt advances both periodic tails by the same power of bb, rotating both length-LL words together without changing their match proportion. We never restart the individual fractions at separate canonical phases.

The Digit Function and Its Bins

Definition 3 (Digit function and bins). For a prime pp not dividing bb, the digit function is δ(r)=⌊br/p⌋\delta(r) = \lfloor br/p \rfloor for r∈{0,…,p−1}r \in \{0, \ldots, p{-}1\}. The bin of digit dd is Bd={r∈{1,…,p−1}:δ(r)=d}B_d = \{r \in \{1, \ldots, p{-}1\} : \delta(r) = d\}, and its size is nd=∣Bd∣n_d = |B_d|.

Lemma 4 (Digit-bin distribution). Write p−1=bq+rp-1=bq+r with 0≤r<b0\le r<b. Exactly rr digit bins have size q+1q+1, and the remaining b−rb-r bins have size qq. Therefore the sum of squared bin sizes is S(p,b)=∑d=0b−1nd2=bq2+r(2q+1).S(p,b) = \sum_{d=0}^{b-1} n_d^2 = bq^2 + r(2q + 1).

Proof. The condition δ(x)=d\delta(x)=d places the integer xx in the half-open interval dpb≤x<(d+1)pb.\frac{dp}{b}\le x<\frac{(d+1)p}{b}. Since pp is prime and p∤bp\nmid b, we have gcd⁡(p,b)=1\gcd(p,b)=1 and 0<(r+1)/b<10<(r+1)/b<1. Each interval has length p/b=q+(r+1)/bp/b=q+(r+1)/b, so each interior bin contains either qq or q+1q+1 integers. The first bin contains exactly the integers 1,…,q1,\ldots,q, and reflection x↦p−xx\mapsto p-x gives the same count for the last bin. Thus every bin has size qq or q+1q+1. There are p−1=bq+rp-1=bq+r remainders altogether, so exactly rr bins have the larger size. Hence S=r(q+1)2+(b−r)q2=rq2+2rq+r+bq2−rq2=bq2+r(2q+1).S = r(q{+}1)^2 + (b{-}r)q^2 = rq^2 + 2rq + r + bq^2 - rq^2 = bq^2 + r(2q + 1). ◻

Corollary 5 (Singleton-bin square sum). When p≤b+1p \le b + 1, all bins have size at most 11, so S(p,b)=p−1S(p,b) = p - 1.

The Coset and Its Bin Sum

For n=pmn=pm with mm a bb-supported integer, choose tt with m∣btm\mid b^t and set u=bt/mu=b^t/m. The coset Cm=u⟨b⟩ mod pC_m = u \langle b \rangle \bmod p is independent of the choice of tt. If t′≥tt'\ge t is another clearing depth, then bt′/m=(bt/m)bt′−tb^{t'}/m=(b^t/m)b^{t'-t}, which lies in the same coset of ⟨b⟩\langle b\rangle. The reverse ordering follows by swapping the two depths. After the common prefix, every nonterminating row k/(pm)k/(pm) is governed by the nonzero residue uk mod puk\bmod p. In particular, the reference tail follows CmC_m, not necessarily the subgroup ⟨b⟩\langle b\rangle itself.

Definition 6 (Coset bin sum). For a coset CC of ⟨b⟩\langle b \rangle in (Z/pZ)∗(\mathbb{Z}/p\mathbb{Z})^{*}, the coset bin sum is T(C)=∑r∈Cnδ(r),T(C) = \sum_{r \in C} n_{\delta(r)}, where nd=∣Bd∣n_d = |B_d| is the size of the dd-th bin.

Different bb-supported values of mm can yield different cosets and therefore different bin sums.

Remark 7. The coset CC has equidistributed bin sum if T(C)=LSp−1,S=∑dnd2.T(C)=\frac{LS}{p-1},\qquad S=\sum_d n_d^2. If every coset has this value, the alignment has one limit even when the selected coset changes with mm. The stronger condition ∣C∩Bd∣=Lnd/(p−1)|C\cap B_d|=Ln_d/(p-1) for every dd forces the displayed identity. When bb is a primitive root modulo pp, there is only one coset and the identity is automatic.

The Alignment Limit

Theorem 8 (Exact coset alignment formula). For any prime p∤bp\nmid b and any bb-supported m≥1m\ge1, the synchronized repetend alignment of n=pmn=pm is αb(pm)=m−1+mT(Cm)Lpm−1,\alpha_b(pm) = \frac{m - 1 + \dfrac{mT(C_m)}{L}}{pm - 1}, where L=ordp(b)L=\mathop{\mathrm{ord}}_p(b) and Cm=u⟨b⟩C_m=u\langle b\rangle is determined by u=bt/mu=b^t/m with m∣btm\mid b^t.

Proof. The m−1m-1 nonzero multiples of pp below pmpm terminate and each contributes score one. The remaining (p−1)m(p-1)m numerators are nonterminating. After the common prefix, their starting states are uk mod puk\bmod p.

At synchronized position ii, let ri=biu mod pr_i=b^iu\bmod p be the reference state. The state for k/(pm)k/(pm) is biuk≡kri(modp).b^iuk\equiv kr_i\pmod p. As kk ranges through the nonzero residue classes modulo pp, the map k↦krik\mapsto kr_i is a permutation. Each residue class is represented by exactly mm numerators below pmpm. Therefore the total match score at position ii is mnδ(ri)m n_{\delta(r_i)}. Summing over one period and dividing by LL, the nonterminating fractions contribute mL∑r∈Cmnδ(r)=mT(Cm)L.\frac{m}{L}\sum_{r\in C_m}n_{\delta(r)} =\frac{mT(C_m)}{L}. Adding the terminating contribution gives αb(pm)(pm−1)=(m−1)+mT(Cm)L.\alpha_b(pm)(pm-1)=(m-1)+\frac{mT(C_m)}{L}. ◻

Corollary 9 (The correction term). For every admissible p,b,mp,b,m, αb(pm)−2m−1pm−1=m(T(Cm)−L)L(pm−1)≥0.\alpha_b(pm)-\frac{2m-1}{pm-1} =\frac{m\bigl(T(C_m)-L\bigr)}{L(pm-1)}\ge0. Equality holds exactly when every state in CmC_m lies in a singleton digit bin.

Proof. Every state belongs to a bin of size at least one, so T(Cm)≥LT(C_m)\ge L. The identity follows by subtracting the two formulas. Equality means nδ(r)=1n_{\delta(r)}=1 for every r∈Cmr\in C_m. ◻

Remark 10. Along any sequence of bb-supported values with m→∞m\to\infty for which the selected coset is fixed at CC, the alignment tends to (L+T(C))/(pL)(L+T(C))/(pL). Different cosets can give different limits, so the unrestricted limit need not exist.

Remark 11. An exhaustive enumeration of all four cosets performed with nfield [9] for p=53p = 53, b=10b = 10, and L=13L = 13 gives two pairs with distinct bin sums. The subgroup ⟨10⟩\langle 10 \rangle and one other coset have T=67T = 67; the cosets 2⟨10⟩2\langle 10 \rangle and 5⟨10⟩5\langle 10 \rangle have T=69T = 69. The two values give two subsequential limits, 80/68980/689 and 82/68982/689. For m=2am = 2^a, u=5au = 5^a, and the coset cycles with a mod 4a \bmod 4.

Corollary 12 (Limit under equidistribution). Suppose every coset of ⟨b⟩\langle b\rangle has equidistributed bin sum in the sense of Remark 7. Then, as m→∞m\to\infty through bb-supported integers, the alignment limit exists and equals L(p,b)=p−1+S(p,b)p(p−1),\mathcal{L}(p,b) = \frac{p - 1 + S(p,b)}{p(p - 1)}, where, by Lemma 4, S(p,b)=bq2+r(2q+1)S(p,b) = bq^2 + r(2q{+}1) with q=⌊(p−1)/b⌋q = \lfloor(p{-}1)/b\rfloor and r=(p−1) mod br = (p{-}1) \bmod b. In particular, this holds whenever bb is a primitive root modulo pp.

Proof. For every coset, substitution gives L+T(C)pL=L+LS/(p−1)pL=p−1+Sp(p−1).\frac{L+T(C)}{pL} =\frac{L+LS/(p-1)}{pL} =\frac{p-1+S}{p(p-1)}. The value is independent of the coset, so it remains the limit even when CmC_m changes. If L=p−1L=p-1, the unique coset contains every nonzero residue and T=ST=S, so the hypothesis is automatic. ◻

Corollary 13 (Digit-partitioning recovery). For every digit-partitioning prime p∤bp\nmid b with p≤b+1p\le b+1 and every bb-supported mm, αb(pm)=2m−1pm−1.\alpha_b(pm)=\frac{2m-1}{pm-1}. Consequently, S=p−1S=p-1 and L(p,b)=2/p\mathcal{L}(p,b)=2/p.

Proof. The digit function is injective, so every occupied bin is a singleton. Thus T(Cm)=LT(C_m)=L for every coset. Theorem 8 gives the finite formula, and its limit is 2/p2/p. Corollary 5 gives S=p−1S=p-1. ◻

The prime two is completely degenerate. If the base is even it belongs to the terminating case, while in an odd base the corollary gives αb(2m)=1\alpha_b(2m)=1. Thus it has alignment one in every base.

The one-digit orbit

When b≡1(modp)b \equiv 1 \pmod p, the order L=1L = 1 and ⟨b⟩={1}\langle b \rangle = \{1\} is trivial. Every coset is a singleton, T(Cm)=nδ(u)T(C_m) = n_{\delta(u)}, and for p≤bp \le b each singleton lies in its own bin with nδ(u)=1n_{\delta(u)}=1. The exact theorem then gives αb(pm)=(m−1)+mpm−1=2m−1pm−1,\alpha_b(pm) = \frac{(m{-}1) + m}{pm - 1} = \frac{2m-1}{pm-1}, recovering the union-count profile in Why the Golden Ratio Selects the Prime Three [6]. This is the one-position specialization of Corollary 13.

Enumeration in Base Ten

Corollary 12 gives the unique limit whenever all cosets have equidistributed bin sum.

For every displayed prime, nfield [9] exhausts every multiplicative coset and evaluates the values in Table 1.

Alignment values for primes up to 6161 that do not divide base 1010. A checkmark means every coset has equidistributed bin sum, so the limit is unique. For p=53p=53 there are four cosets; the subgroup value is shown, while the other value is 82/68982/689.
pp LL SS Equidist. Subgroup limit Decimal
3 1 2 2/32/3 0.66670.6667
7 6 6 2/72/7 0.28570.2857
11 2 10 2/112/11 0.18180.1818
13 6 16 7/397/39 0.17950.1795
17 16 28 11/6811/68 0.16180.1618
19 18 34 26/17126/171 0.15200.1520
23 22 50 36/25336/253 0.14230.1423
29 28 80 27/20327/203 0.13300.1330
31 15 90 4/314/31 0.12900.1290
37 3 132 14/11114/111 0.12610.1261
41 5 160 5/415/41 0.12200.1220
43 21 178 110/903110/903 0.12180.1218
47 46 214 130/1081130/1081 0.12030.1203
53 13 272 80/68980/689 0.11610.1161
59 58 338 198/1711198/1711 0.11570.1157
61 60 360 7/617/61 0.11480.1148

The Golden Ratio Bound

Theorem 14 (Sharp uniform bound). For every prime p≥5p\ge5 with p∤bp\nmid b, every base b≥2b\ge2, and every bb-supported m≥1m\ge1, αb(pm)<35<1φ.\alpha_b(pm)<\frac35<\frac1\varphi. Every subsequential alignment limit is at most 3/53/5 and therefore remains strictly below 1/φ1/\varphi.

Proof. Put c=⌈(p−1)/b⌉c=\lceil(p-1)/b\rceil. Every bin has size at most cc, so T(C)/L≤cT(C)/L\le c for every coset. The exact formula gives αb(pm)≤m−1+mcpm−1<1+cp≤p+12p≤35.\alpha_b(pm) \le\frac{m-1+mc}{pm-1} <\frac{1+c}{p} \le\frac{p+1}{2p} \le\frac35. The strict step follows because the difference between its right and left sides is p−1−cp(pm−1)>0.\frac{p-1-c}{p(pm-1)}>0. Indeed, b≥2b\ge2 and odd p≥5p\ge5 give c≤(p−1)/2<p−1c\le(p-1)/2<p-1. Finally, 3/5<1/φ3/5<1/\varphi because 3φ<53\varphi<5, equivalently 35<73\sqrt5<7. ◻

Proposition 15 (Sharpness). The constant 3/53/5 is the optimal uniform supremum.

Proof. Take p=5p=5 and b=2b=2. The base has order four modulo five, and both digit bins have size two. Hence T/L=2T/L=2, so for m=2am=2^a, α2(5m)=3m−15m−1⟶35.\alpha_2(5m)=\frac{3m-1}{5m-1}\longrightarrow\frac35. Theorem 14 shows that no finite admissible value reaches or exceeds 3/53/5. ◻

Together, Theorem 14 and Proposition 15 give the best uniform bound. Thus among primes p≥3p\ge3 that do not divide the base, only p=3p=3 can produce alignment above 1/φ1/\varphi. The result needs no equidistribution hypothesis and does not depend on the coset.

Coset Splitting and the Composite Boundary

The bin-sum formula

The quantity S(p,b)=∑dnd2S(p,b)=\sum_d n_d^2 counts ordered pairs of nonzero remainders that emit the same digit. Therefore S(p,b)p−1\frac{S(p,b)}{p-1} is the expected size of the bin containing a uniformly chosen remainder, while S(p,b)/(p−1)2S(p,b)/(p-1)^2 is the collision probability for two independent uniform remainders.

The role of equidistribution

An exhaustive nfield [9] enumeration of every coset for every prime below 100100 that does not divide ten shows that all cosets have equidistributed bin sum except at 5353, 7373, 7979, and 8989. At these four primes, different cosets meet digit bins with different total sizes. A structural characterization of the pairs (p,b)(p,b) for which every coset is equidistributed remains open. Character-sum methods provide the natural wider setting for that question [8].

Beyond the prime case

For denominators pmpm with mm supported on the base and p∤bp\nmid b prime, the exact formula accounts for every partial digit agreement. The example at 5353 shows why the reference coset must be retained even as mm grows. The sharp bound has a different source. No coset can encounter a bin larger than the floor partition allows, so every prime p≥5p\ge5 stays below 3/53/5.

Thus collisions can split the limiting alignment without allowing another prime p≥3p\ge3 to cross the golden threshold. A denominator whose part outside the base is composite requires a further argument; the prime formula does not classify that case.

References

[1]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.

[2]K. Girstmair, The digits of 1/p1/p in connection with class number factors, Acta Arith. 67 (1994), no. 4, 381–386. https://doi.org/10.4064/aa-67-4-381-386.

[3]K. Girstmair, Digit variance and Dedekind sums, J. Number Theory 65 (1997), no. 2, 197–205. https://doi.org/10.1006/jnth.1997.2149.

[4]M. R. Murty and R. Thangadurai, The class number of Q(−p)\mathbb{Q}(\sqrt{-p}) and digits of 1/p1/p, Proc. Amer. Math. Soc. 139 (2011), no. 4, 1277–1289. https://doi.org/10.1090/S0002-9939-2010-10560-9.

[5]K. Girstmair, Mean values and variances of the digits of 1/p1/p, 2026. https://arxiv.org/abs/2606.29930.

[6]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.

[7]A. S. Petty, Digit-Partitioning Primes and the Alignment Formula, research note, April 2020 (revised September 2026), DOI: https://doi.org/10.5281/zenodo.21844074.

[8]H. Iwaniec and E. Kowalski, Analytic Number Theory, Amer. Math. Soc., 2004.

[9]A. S. Petty, nfield, software repository. https://github.com/alexspetty/nfield