The Centered Collision Sum
Abstract
Fix a base b\geq2 and a lag \ell\geq1. Partition the nonzero residues modulo an integer p coprime to b by the leading base-b digit of r/p, and count the residues whose digit is unchanged by multiplication by b^\ell. Once p>b^{\ell+1}, subtracting the bin-scale term leaves an integer that depends only on p\bmod b^{\ell+1}. It is therefore a finite function on the unit group modulo b^{\ell+1}.
The finite function obeys an exact reflection law with mean -1/2. Center it separately over the fibers of reduction modulo b. The centered signal is odd under reflection and has zero sum on every reduction fiber. Its Dirichlet-character transform consequently vanishes in every even channel and in every channel induced from modulus b. Only odd characters that detect structure below the base-level partition can survive. This is the spectral gate.
Two prime limits follow. The unweighted centered average tends to zero by the prime number theorem in arithmetic progressions, and the reciprocal-prime centered sum converges by Mertens’ theorem in arithmetic progressions. The uncentered constructive-mean fluctuation retains the same leading drift at every lag, -\frac{b-1}{b}\log\log x. For prime bases at lag one, the reduction-fiber means are also obtained in closed form.
The finite source of convergence
A bounded arithmetic fluctuation can build an unbounded sum over reciprocal primes. For the collision deviation, the drift is exact rather than numerical. The Collision Fluctuation Sum [1] finds its coefficient as -(b-1)/b. The source is finite. Every reduced residue family carries its own bias.
That same finite source gives a way to remove the divergence. Subtract the exact mean inside each reduction family. The centered sum over reciprocal primes then converges at every lag, even while the uncentered sum continues to drift. Centering is not fitted to the primes. It is an identity in a finite table.
The collision count begins with a partition of the unit interval. The fractions r/p lie in its b equal intervals. Multiplication by b^\ell permutes the nonzero residues whenever p is coprime to b. A collision records a residue whose initial interval and final interval agree.
The count itself grows with p. Subtracting its bin-scale term leaves a bounded integer. The first result shows that this integer is not an unstructured sequence. At fixed base and lag, all of its values are stored in one finite table.
Let [x]_p denote the representative of x\bmod p in \{1,\ldots,p-1\} whenever p\nmid x. Define \delta_{p,b}(r)=\left\lfloor\frac{br}{p}\right\rfloor, \qquad 1\leq r<p. For a unit multiplier g\bmod p, define C_{p,b}(g)= \#\left\{r\in\{1,\ldots,p-1\}\ \middle|\ \delta_{p,b}(r)=\delta_{p,b}([gr]_p)\right\}. The lag-\ell count is C_{b,\ell}(p)=C_{p,b}([b^\ell]_p). Write S_{b,\ell}(p)=C_{b,\ell}(p) -\left\lfloor\frac{p-1}{b}\right\rfloor. Primality is not needed for the finite structure.
The all-lag table
Put q=b^{\ell+1} and let G_{b,\ell}= \left\{n\in\{0,\ldots,q-1\}\ \middle|\ \left\lfloor\frac{n}{b^\ell}\right\rfloor=n\bmod b\right\}. The first and last base-b digits of every index in G_{b,\ell} agree. The middle \ell-1 digits are free, so |G_{b,\ell}|=b^\ell. Both endpoint indices 0 and q-1 belong to this set.
Theorem 1 (Finite determination). Let b\geq2, \ell\geq1, and p>q with \gcd(p,b)=1. Write p=qt+a, where 1\leq a<q. Then S_{b,\ell}(p)=T_{b,\ell}(a), where T_{b,\ell}(a)= -1-\left\lfloor\frac ab\right\rfloor +\sum_{n\in G_{b,\ell}} \left( \left\lfloor\frac{(n+1)a}{q}\right\rfloor -\left\lfloor\frac{na}{q}\right\rfloor \right). Thus S_{b,\ell}(p) depends only on the unit class of p modulo b^{\ell+1}.
Proof. For 1\leq r<p, set n(r)=\left\lfloor\frac{qr}{p}\right\rfloor. The identity \lfloor\lfloor x\rfloor/k\rfloor=\lfloor x/k\rfloor for positive integers k gives \delta_{p,b}(r)=\left\lfloor\frac{n(r)}{b^\ell}\right\rfloor. Writing b^\ell r=p\lfloor b^\ell r/p\rfloor+[b^\ell r]_p gives \delta_{p,b}([b^\ell r]_p) =n(r)-b\left\lfloor\frac{n(r)}b\right\rfloor =n(r)\bmod b. A collision occurs exactly on the slices indexed by G_{b,\ell}.
Since \gcd(p,b)=1 and q is a power of b, we have \gcd(p,q)=1. Every interior slice boundary is therefore nonintegral. The floor difference \left\lfloor\frac{(n+1)p}{q}\right\rfloor -\left\lfloor\frac{np}{q}\right\rfloor counts the positive residues in every slice except the terminal one. There it also counts the excluded endpoint p. Since q-1 belongs to G_{b,\ell}, C_{b,\ell}(p)= -1+\sum_{n\in G_{b,\ell}} \left( \left\lfloor\frac{(n+1)p}{q}\right\rfloor -\left\lfloor\frac{np}{q}\right\rfloor \right).
Substitution of p=qt+a contributes t from each of the b^\ell diagonal slices. Since a is a unit modulo b, \left\lfloor\frac{p-1}{b}\right\rfloor =b^\ell t+\left\lfloor\frac ab\right\rfloor. Subtracting this expression from (10) proves (9). ◻
Corollary 2. For fixed b and \ell, the integers S_{b,\ell}(p) are uniformly bounded as p ranges over integers greater than b^{\ell+1} and coprime to b.
Proof. They are values of the finite function T_{b,\ell} on the unit group modulo b^{\ell+1}. ◻
In base ten at lag two, reduction modulo 100 is not enough. Direct substitution in (9) gives S_{10,2}(1009)=8, \qquad S_{10,2}(1109)=-10, although the two arguments agree modulo 100. Reduction modulo 1000 always suffices by Theorem 1.
Reflection
The finite table has a fixed center before any prime is sampled.
Theorem 3 (Reflection law). For every a\in(\mathbb Z/q\mathbb Z)^\times, T_{b,\ell}(a)+T_{b,\ell}(q-a)=-1.
Proof. For 0\leq n<q, write D_n(a)= \left\lfloor\frac{(n+1)a}{q}\right\rfloor -\left\lfloor\frac{na}{q}\right\rfloor. If 1\leq n\leq q-2, none of na and (n+1)a is divisible by q. Complementary floors then give D_n(a)+D_n(q-a)=1. At n=0 the two increments sum to zero. At n=q-1 they sum to two. Both endpoints lie in G_{b,\ell}, whose size is b^\ell. Hence \sum_{n\in G_{b,\ell}} \bigl(D_n(a)+D_n(q-a)\bigr)=b^\ell.
Write a=bh+s with 1\leq s<b. Since q/b=b^\ell, \left\lfloor\frac ab\right\rfloor +\left\lfloor\frac{q-a}{b}\right\rfloor=b^\ell-1. Equations (9), (13), and (14) now give (11). ◻
Corollary 4 (Grand mean). The exact mean of T_{b,\ell} on the unit group modulo q is \frac1{\varphi(q)} \sum_{a\in(\mathbb Z/q\mathbb Z)^\times}T_{b,\ell}(a) =-\frac12.
Proof. Negation pairs the units without a fixed point, and every pair has sum -1. ◻
Centering by reduction fibers
Let \rho\colon(\mathbb Z/q\mathbb Z)^\times \longrightarrow(\mathbb Z/b\mathbb Z)^\times be reduction modulo b. For u\in(\mathbb Z/b\mathbb Z)^\times, write A_u=\{a\in(\mathbb Z/q\mathbb Z)^\times\mid \rho(a)=u\}. Each fiber has exactly b^\ell elements. Define its exact mean by \mu_{b,\ell}(u)=\frac1{b^\ell}\sum_{a\in A_u}T_{b,\ell}(a).
Definition 5. The centered collision table is T_{b,\ell}^{\circ}(a) =T_{b,\ell}(a)-\mu_{b,\ell}(\rho(a)).
This centering removes one number from each coarse digit family, not one number from the table as a whole. It leaves the variation among the b^\ell lifts of the same base-level class.
Proposition 6 (Centered symmetry). For every unit u modulo b and every unit a modulo q, \begin{aligned} \mu_{b,\ell}(u)+\mu_{b,\ell}(-u)&=-1, \\ T_{b,\ell}^{\circ}(-a)&=-T_{b,\ell}^{\circ}(a), \\ \sum_{a\in A_u}T_{b,\ell}^{\circ}(a)&=0. \end{aligned}
Proof. Negation maps A_u bijectively onto A_{-u}. Averaging the reflection law over A_u proves (18). Subtracting it from the pointwise reflection law proves (19). Equation (20) is the definition of the fiber mean. ◻
The spectral gate
Every function on the finite unit group has a unique expansion in Dirichlet characters modulo q. For such a function f, set \widehat f(\chi)= \frac1{\varphi(q)} \sum_{a\in(\mathbb Z/q\mathbb Z)^\times} f(a)\overline{\chi(a)}. Then f(a)=\sum_{\chi\bmod q}\widehat f(\chi)\chi(a). Applied to the finite collision table, this is the collision transform.
A star on a residue sum restricts the sum to unit classes.
Before fiber centering, reflection already removes almost every even channel. The trivial coefficient of T_{b,\ell} is -1/2, and every nontrivial even-character coefficient is zero. Fiber centering removes the trivial channel and, by a separate mechanism, every channel that factors through modulus b.
Theorem 7 (Spectral gate). Let \chi be a Dirichlet character modulo q=b^{\ell+1}. Then \widehat{T_{b,\ell}^{\circ}}(\chi)=0 whenever either of the following conditions holds.
\chi is even.
\chi factors through reduction modulo b.
Consequently, the centered collision transform is supported only on odd characters that do not factor through modulus b.
Proof. If \chi(-1)=1, pair a with -a in (21). Equation (19) makes the two summands cancel.
Now suppose \chi=\psi\circ\rho for a character \psi modulo b. Grouping the transform by reduction fibers gives \sum_{a\bmod q}^{*} T_{b,\ell}^{\circ}(a)\overline{\chi(a)} =\sum_{u\bmod b}^{*}\overline{\psi(u)} \sum_{a\in A_u}T_{b,\ell}^{\circ}(a). Every inner sum is zero by (20). This proves the second vanishing statement. ◻
Corollary 8. If b is prime and \ell=1, the only possible nonzero coefficients of the centered collision transform belong to primitive odd characters modulo b^2.
Proof. A character modulo b^2 is imprimitive exactly when it factors through modulus b. Theorem 7 also requires odd parity. ◻
The gate is exact. It does not say that every remaining coefficient is nonzero. It says that reflection and coarse-family centering leave no other place for the signal to live.
Prime averages
For x>q, define \begin{aligned} P_{b,\ell}^{\circ}(x) &=\sum_{q<p\leq x}T_{b,\ell}^{\circ}(p\bmod q), \\ H_{b,\ell}^{\circ}(x) &=\sum_{q<p\leq x}\frac{T_{b,\ell}^{\circ}(p\bmod q)}p. \end{aligned} Both sums run over primes.
Theorem 9 (Centered prime limits). For every fixed base b\geq2 and lag \ell\geq1, \begin{aligned} P_{b,\ell}^{\circ}(x)&=o(\pi(x)), \\ \lim_{x\to\infty}H_{b,\ell}^{\circ}(x)&=K_{b,\ell} \end{aligned} for a finite real constant K_{b,\ell}.
Proof. The prime number theorem in arithmetic progressions gives \pi(x;q,a)=\frac{\operatorname{Li}(x)}{\varphi(q)} +o\bigl(\operatorname{Li}(x)\bigr) for each unit class a modulo the fixed modulus q. The total sum of T_{b,\ell}^{\circ} is zero by (20). Multiplying the class asymptotics by the finite table entries and adding proves (26).
By Mertens’ theorem in arithmetic progressions [2, 3], there are constants M(q,a) for which \sum_{\substack{p\leq x\\p\equiv a\, (\mathrm{mod}\ q)}}\frac1p =\frac1{\varphi(q)}\log\log x+M(q,a)+o(1). Again the coefficient of the common \log\log x term is the total sum of the centered table, so it vanishes. The finite sum of the remaining class constants converges to K_{b,\ell}. ◻
Combining Theorems 7 and 9 gives the character form K_{b,\ell} =\sum_{\substack{\chi\bmod q\\ \chi(-1)=-1\\ \chi\text{ does not factor through }b}} \widehat{T_{b,\ell}^{\circ}}(\chi) \lim_{x\to\infty}\sum_{q<p\leq x}\frac{\chi(p)}p. The outer sum is finite. The gate therefore survives intact at the prime harmonic boundary. Every character in (30) is odd and therefore nonprincipal. Its individual reciprocal-prime limit exists because the common Mertens term cancels.
Drift at every lag
The centered table converges because every coarse family has been balanced exactly. The constructive-mean fluctuation keeps the coarse bias and therefore has a different limit law.
Let p>b+1 be prime and write p-1=bQ+R, \qquad 0\leq R<b. Call a unit multiplier g\not\equiv1\pmod p constructive when its collision count is positive.
Proposition 10 (Constructive mean). The exact mean collision count over the constructive unit multipliers g\not\equiv1\pmod p is \overline C_{p,b}=Q+\frac{QR}{p-b-1}.
Proof. For a unit multiplier g\not\equiv1\pmod p, introduce the coordinate c(g)=[b(1-g)^{-1}]_p in the nonzero residues modulo p. Euclidean division gives br=p\delta_{p,b}(r)+[br]_p. Since p is invertible modulo b, two residues have the same digit exactly when their images under multiplication by b agree modulo b. Permute the nonzero residues by multiplication by b and call the resulting coordinate y. A collision is then a solution of [gy]_p=y+mb for a nonzero integer m with |m|\leq Q. The definition of c(g) turns this relation into y\equiv-mc(g)\pmod p. Pairing m with -m gives C_{p,b}(g)=2\#\{1\leq m\leq Q\mid [mc(g)]_p>mb\}. If c(g)<b, then [mc(g)]_p=mc(g)<mb for every 1\leq m\leq Q. If c(g)>b, the index m=1 contributes. The value c(g)=b would force g=0 and cannot occur for a unit multiplier. Thus the count vanishes exactly when c(g)\in\{1,\ldots,b-1\}. As g runs through the nonidentity multipliers, 1-g runs through the nonzero classes other than 1. Inversion followed by multiplication by b is therefore a bijection onto \{1,\ldots,p-1\}\setminus\{b\}. Exactly b-1 nonidentity multipliers have zero collisions.
Let n_d be the number of residues in digit bin d. For a fixed residue r, the images [gr]_p run through every nonzero residue other than r as g runs through the nonidentity multipliers. Reversing the order of summation gives \sum_{g\ne1}C_{p,b}(g)=\sum_{d=0}^{b-1}n_d(n_d-1). There are R bins of size Q+1 and b-R bins of size Q, so the last expression is Q\bigl(b(Q-1)+2R\bigr). The zero multipliers contribute nothing. Dividing by the p-b-1 constructive multipliers and simplifying proves (34). ◻
For p>q, the multiplier [b^\ell]_p is nonidentity and constructive. It cannot be the identity because b^\ell-1<p. If its coordinate c([b^\ell]_p) were an integer k between 1 and b-1, then k(1-b^\ell)\equiv b\pmod p. The difference between the two sides is nonzero and has absolute value at most (b-1)(b^\ell-1)+b<q<p, which is impossible. Define \Delta_{b,\ell}(p)=C_{b,\ell}(p)-\overline C_{p,b}. Equations (4) and (34) give \Delta_{b,\ell}(p) =S_{b,\ell}(p)-\frac{QR}{p-b-1}.
Theorem 11 (All-lag drift). For every fixed base b\geq2 and lag \ell\geq1, there is a real constant \kappa_{b,\ell} such that \sum_{q<p\leq x}\frac{\Delta_{b,\ell}(p)}p =-\frac{b-1}{b}\log\log x+\kappa_{b,\ell}+o(1). The leading coefficient is independent of the lag.
Proof. The finite table has mean -1/2 by Corollary 4. Mertens’ theorem in arithmetic progressions therefore gives \sum_{q<p\leq x}\frac{S_{b,\ell}(p)}p =-\frac12\log\log x+\kappa_{b,\ell}^{(S)}+o(1). The correction in (37) satisfies \frac{QR}{p-b-1} =\frac Rb+\frac{R(b-R)}{b(p-b-1)}. After division by p, the second term on the right contributes an absolutely convergent series. If u runs through the least positive representatives of the reduced residue classes modulo b and R=u-1, reflection gives \frac1{\varphi(b)}\sum_{u\bmod b}^{*}\frac{u-1}{b} =\frac12-\frac1b. Mertens’ theorem in arithmetic progressions applies once more. The coefficient in (38) is consequently -\frac12-\left(\frac12-\frac1b\right) =-\frac{b-1}{b}. ◻
The lag changes the finite table, the surviving character coefficients, and the additive constant. It does not change the leading drift carried by the coarse arithmetic mean.
Prime-base columns
At lag one, prime bases permit a closed formula for every reduction fiber. The column means are exact.
Lemma 12 (A floor sum). Let b be prime, 1\leq s<b, and c\geq0. Put H_c(s)=\sum_{k=0}^{b-1} \left\lfloor\frac{c(bk+s)}{b^2}\right\rfloor. If b\nmid c, then H_c(s)=\frac{(c-1)(b-1)}2+ \left\lfloor\frac{cs}{b}\right\rfloor. If c=bh, then H_c(s)=\frac{hb(b-1)}2+b\left\lfloor\frac{hs}{b}\right\rfloor.
Proof. Put v=\lfloor cs/b\rfloor. For every k, \left\lfloor\frac{c(bk+s)}{b^2}\right\rfloor =\left\lfloor\frac{ck+v}{b}\right\rfloor. If b\nmid c, the residues ck+v\bmod b run once through all classes modulo b. Subtracting their sum from \sum_k(ck+v) proves (42). If c=bh, direct summation proves (43). ◻
Theorem 13 (Prime-base column law). Let b be prime and \ell=1. For every s\in\{1,\ldots,b-1\}, \mu_{b,1}(s)=\frac{s}{b}-1.
Proof. At lag one, G_{b,1}=\{d(b+1)\mid0\leq d<b\}. Sum the increment part of (9) over the fiber a=bk+s, where 0\leq k<b. In the notation of Lemma 12, this gives \sum_{d=0}^{b-1} \bigl(H_{d(b+1)+1}(s)-H_{d(b+1)}(s)\bigr). The term with d=0 is zero. For 1\leq d\leq b-2, Lemma 12 gives \frac{b-1}{2} +\left\lfloor\frac{(d+1)s}{b}\right\rfloor -\left\lfloor\frac{ds}{b}\right\rfloor. At the endpoint d=b-1, the two cases of Lemma 12 give H_{b^2}(s)=\frac{b^2(b-1)}2+bs, \qquad H_{b^2-1}(s)=\frac{(b^2-2)(b-1)}2+bs-1, so the endpoint contribution is b. The interior floor differences telescope to s-1. This also covers b=2, when the interior sum is empty and s=1. Thus (45) equals \frac{b(b-1)}2+s. The remaining terms in (9) sum to \sum_{k=0}^{b-1}(-1-k) =-b-\frac{b(b-1)}2. Thus the sum of T_{b,1} over the fiber is s-b. Division by the fiber size b proves (44). ◻
For base three, the two means are -2/3 and -1/3. These values are forced by the collision columns themselves. They are not fitted from prime data.
Base ten
Base ten is composite, so Theorem 13 does not apply. Exact evaluation of the forty entries of T_{10,1} gives \mu_{10,1}(1)=-\frac{17}{10},\quad \mu_{10,1}(3)=-\frac9{10},\quad \mu_{10,1}(7)=-\frac1{10},\quad \mu_{10,1}(9)=\frac7{10}. Their average is -1/2, and the first pairs with the fourth while the second pairs with the third under (18).
The partial sums below use the exact means in (47). Every included prime is greater than 100.
| included primes | largest prime | H_{10,1}^{\circ} |
|---|---|---|
| 1{,}000 | 8{,}167 | 0.081643173 |
| 10{,}000 | 105{,}019 | 0.077004672 |
| 100{,}000 | 1{,}300{,}051 | 0.077300691 |
| 664{,}554 | 9{,}999{,}991 | 0.077215575 |
nfield [4] checks the finite identities at explicit ranges. Its all-lag verification exhausts bases two through twelve and lags one through three. It also checks 161 direct collision representatives, the prime-base column law through base 97, and every value in Table 1.
Centered harmonic support
The construction starts with a finite count. At every lag, one table contains the entire collision deviation for all sufficiently large inputs. Reflection fixes its center. Reduction modulo the base then separates the coarse families from the variation inside each family.
Centering by those families does more than improve a numerical sum. It removes exact spectral channels. Every even character disappears, and every character inherited from the base-level partition disappears. The remaining wave is both odd and genuinely finer than the original digit partition.
The two prime limits fix the analytic boundary. Ordinary prime averaging cancels the centered signal, while reciprocal-prime weighting reaches a finite value assembled only from the surviving channels. The uncentered fluctuation still carries a universal logarithmic drift whose coefficient does not depend on lag.
What geometry do the individual cells of the lag-one table obey?
References
[1]A. S. Petty, The Collision Fluctuation Sum, research note, April 2023, revised August 2026. doi:10.5281/zenodo.21852234.
[2]F. Mertens, Ein Beitrag zur analytischen Zahlentheorie, J. Reine Angew. Math. 78 (1874), 46–62.
[3]H. Davenport, Multiplicative Number Theory, 3rd ed., Springer, 2000.
[4]A. S. Petty, nfield, software repository. https://github.com/alexspetty/nfield