The Collision Invariant
Cite this paper
A. S. Petty, The Collision Invariant, arXiv:2604.00045, DOI: 10.5281/zenodo.21855821.
Abstract
When is a primitive root modulo a prime , the number of equal digit coordinates is the agreement form of cyclic-shift Hamming correlation for the base- repetend of . We place this observable on the complete nonzero residue ensemble, where the lag theory requires neither primality nor a primitive-root hypothesis. Multiplication by conjugates the digit bins to ordinary residue classes modulo . For every prime , the resulting coordinate formula shows that every is even and that precisely multipliers have no collisions. They are For the multiplier , if and , then depends only on modulo , and no smaller power of determines it. Reflection gives , an exact mean of , and a half-group law for every interior wrapping set.
The Base-Only Gate
How many digits of a repetend survive a cyclic shift? When is a primitive root modulo , the powers of visit every nonzero residue. The digit in the position indexed by a residue is , and shifting the repetend by positions replaces by . Thus is exactly the number of agreements with that cyclic shift, while is its Hamming distance.
Sequence agreement under cyclic shift belongs to classical Hamming correlation theory [1]. Kak and Chatterjee studied prime-reciprocal digit sequences as communication codes and obtained bounds for their Hamming distance from cyclic shifts and for their autocorrelation [2]. Armstrong and Armstrong study changing bases, repetend multiplication, and its group structure [3]. These sources establish that the shift observable and its group-theoretic setting are prior art.
A neighboring number-theoretic literature weights digit values along a reciprocal orbit. Under primitive-root hypotheses, Girstmair connected those values with class-number factors and expressed digit variance using a Dedekind sum [4, 5]. Murty and Thangadurai extended digit-average questions to bases of prescribed order using generalized Bernoulli numbers and Dirichlet -functions [6]. Those value statistics are distinct from the equality indicator considered here, but they identify the established arithmetic setting around reciprocal digits.
The present question is a family question rather than a claim to have introduced cyclic-shift agreement. Replace a single reciprocal orbit by the complete set of nonzero residues. In the full-reptend case the two ensembles coincide. When the order of is smaller, the complete ensemble contains every orbit, and for the lag results the modulus need not be prime. Multiplication by the base then turns the digit intervals into ordinary residue classes. This conjugation gives the collision-coordinate formula, the base-only zero gate, the sharp determining modulus, and the reflection and half-group laws proved below. No priority claim is made for the underlying Hamming observable.
Let , with prime. The digit function assigns to each nonzero residue modulo its leading digit in base . It partitions the residues into bins . More explicitly, If with , then bins have size and the others have size . Nothing probabilistic enters this partition. It is the direct division of the interval by the first base- digit.
The definitions extend without change to every integer with . For , put For an integer , let denote its least nonnegative residue modulo .
Definition 1. For , the collision count is
The collision count measures how many residues share a bin with their image under multiplication by . It is a function on the multiplicative group that encodes the interaction between the additive structure of the bins and the multiplicative action of .
For , the collision deviation at lag is For prime we write , , and when the modulus is clear.
The Linearization
The key structural observation is that multiplication by transforms the bin partition into a congruence partition.
Lemma 2 (Conjugation). Let with . For , put . Then and Under the permutation , the digit bins become the residue classes modulo inside .
Proof. The first identity is Euclidean division. Reducing it modulo gives The integer is invertible modulo , and the digit lies in . Thus the residue of modulo determines the digit and is determined by it. Multiplication by permutes the nonzero residue classes modulo . ◻
The interval problem has become a congruence problem. The rest of the argument stays in that coordinate system.
Lemma 3 (Collision congruence). For every ,
Proof. Apply Lemma 2 to the pair and , then replace by . The second transformed residue is . ◻
The Gate Width Theorem
Fix a prime and write For , define the least positive residue
Lemma 4 (Collision coordinate). For every ,
Proof. By Lemma 3, a collision is a pair satisfying for a nonzero integer with . The case would force , and the bound follows from . The defining congruence gives
Let . For , the unique candidate is , and exactly when . For , the unique candidate is , and under the same condition. Thus every successful supplies two collisions and every collision arises in one of these two ways. The two displacements have opposite signs, so the two collisions are distinct. ◻
Corollary 5 (Bilateral parity). The integer is even for every .
Proof. Lemma 4 handles . For the identity, , which is even. ◻
Theorem 6 (Gate width). For any prime , In particular, exactly multipliers have , independent of .
Proof. The identity has . For , the value would imply and hence . If , then for we have Lemma 4 gives . If , the index contributes and . Therefore the zero set is given by .
Solving and putting gives The identity recovers from . Thus the elements are distinct. ◻
Remark 7. The deranging multipliers form a rational family parameterized by . The count depends only on the base, not on the prime. No primitive-root hypothesis is needed.
The Finite Determination Theorem
Theorem 8 (Finite determination). Let and . For every integer with , the collision deviation depends only on modulo .
Proof. Put For , define the slice index . Dividing the inequalities by shows that the original digit is To read the transformed digit, write with . Then and therefore
The two digits agree exactly on the diagonal set It has the explicit form Indeed, is the leading base- digit of the slice index, while the congruence condition fixes its final digit. In particular, and both and belong to it.
For , the floor difference counts the integers in slice , except that the final difference also includes the endpoint . All internal slice endpoints are nonintegral because . Since the final slice is diagonal, the extra endpoint is removed by
Write with . The coprimality condition makes a unit modulo , so . Every summand separates as Also The copies of cancel, leaving The right side depends only on the least positive residue . ◻
Definition 9. Let . Represent each unit class modulo by its least positive integer . Define by the right side of (1). Equivalently, it is the common value of over all with .
Among powers of , the modulus in Theorem 8 cannot be lowered.
Proposition 10 (Optimal base power). Put and . The unit classes are congruent modulo , while Thus no power with determines .
Proof. Both classes are congruent to modulo and are therefore units modulo . In (1), the only diagonal increment for occurs at . Hence .
Write a diagonal index as Since , reduction modulo gives This lies between and . The corresponding floor increment is exactly when . Equality occurs only for and , which gives . Thus the diagonal sum is again . Finally, and the claimed value follows from (1). ◻
The Reflection Identity
Theorem 11 (Reflection). Let and let be the least positive representative of a unit modulo . Then
Proof. Write Equation (1) gives
For , neither nor is divisible by . Hence and
At the two endpoints, Both endpoints lie in . Their paired totals are therefore and , while each of the other diagonal slices has paired total .
Since , Combining the floor terms and diagonal contributions gives ◻
Corollary 12 (Grand mean). The average of over all units modulo is .
Proof. The map permutes the units. Summing the reflection identity over every unit counts the total of twice and gives . Division by gives the mean. ◻
The Half-Group Structure
The finite formula for is a sum of floor increments. The increment at index equals when crosses a multiple of . This local balance does not depend on whether belongs to the collision diagonal.
Let and let . Using least positive representatives for the units, define
Theorem 13 (Half-group). For every and every ,
Proof. Put , so . If is a unit, then is nonzero. Also would imply and hence , which is impossible. Therefore is always strictly below or strictly above .
Reflection gives It reverses the strict comparison with . Thus carries bijectively onto its complement in the unit group. The two sets have the same size. ◻
Corollary 14. For , every diagonal slice in other than and has a wrapping set of size .
The collision diagonal chooses which local increments enter . Their exact half-group balance is already present on every interior slice.
Finite Checks
The results above are symbolic. Independent exact checks with nfield [7] evaluated the gate theorem for all pairs with and prime . At lag one, finite determination was checked for every eligible prime through in bases and , giving prime instances with every unit class represented. Reflection and the exact mean were checked on every unit class in those four finite tables. For base and lags , finite determination was also checked for all eligible prime instances through . These finite calculations are independent checks and are not used in the proofs.
Finite Arithmetic
In a full repetend, counts the coordinates retained by a cyclic shift. The complete-residue formulation keeps that observable when does not generate the multiplicative group and when the lag modulus is composite. It also exposes statements about an entire denominator family that cannot be read from a single reciprocal sequence.
The first such statement is the gate theorem. Its collision coordinate pairs the two possible displacement directions, proves evenness, and classifies the zero set by explicit multipliers. The second is sharp finite determination. At lag , the deviation is a function on the units modulo , and the two witnesses in Proposition 10 show that no lower power of the base carries the same information. Reflection then gives both the mean and the half-group law for every interior wrapping cut.
These conclusions concern finite modular arithmetic, not the distribution of primes. Primes provide one source of unit classes, but primality is absent from the all-lag determination and reflection theorems. The contribution is therefore not a new definition of Hamming correlation. It is the exact complete-ensemble coordinate and the resulting classification of its zero gate, determining modulus, and reflection balance. This finite table is consequently ready for character or prime sampling without confusing those later questions with what has already been proved here.
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]K. Girstmair, The digits of in connection with class number factors, Acta Arith. 67 (1994), no. 4, 381–386. https://doi.org/10.4064/aa-67-4-381-386
[5]K. Girstmair, Digit variance and Dedekind sums, J. Number Theory 65 (1997), no. 2, 197–205. https://doi.org/10.1006/jnth.1997.2149
[6]M. R. Murty and R. Thangadurai, The class number of and digits of , Proc. Amer. Math. Soc. 139 (2011), no. 4, 1277–1289. https://doi.org/10.1090/S0002-9939-2010-10560-9
[7]A. S. Petty, nfield, software repository. https://github.com/alexspetty/nfield