A finite formula for residues of affine binomial coefficients
He and Yuan asked which residues \(\binom{an}{bn}\bmod p\) occur as \(n\) ranges over the positive integers, for every pair of integers \(a>b>0\) and every prime \(p\nmid a\). The answer is zero together with the \(h\)-th roots of unity in the nonzero multiplicative group \(\mathbb F_p^\times\), where \(h\) is computed from a graph with exactly \(a+b-\gcd(a,b)\) carry states. He and Yuan had already established multiplicative closure and the occurrence of zero, and finite computation was already possible. The new result gives an explicit carry graph and computes the order of the nonzero subgroup as a least common multiple of local edge orders. He–Yuan, Problem 3.6 and Proposition 3.3, p. 438 · Definition of the residue set and Lemma 3.1, p. 437 Use a state \((u,v)\) for each pair of integers \(0\le u<a\) and \(0\le v<b\) for which the half-open intervals \([u/a,(u+1)/a)\) and \([v/b,(v+1)/b)\) intersect. The pair records the carries in multiplying the same base-\(p\) input by \(a\) and by \(b\), starting at \(s=(0,0)\) and reading the least significant digit first. For each state and each digit \(d\in\{0,\ldots,p-1\}\), compute the integer quotients \(u',v'\) and remainders \(i,j\) from \[ad+u=pu'+i,\qquad bd+v=pv'+j,\qquad 0\le i,j<p. \] When \(j\le i\), include the edge from \((u,v)\) to \((u',v')\) with digit \(d\) and weight \(w=\binom{i}{j}\bmod p\) in \(\mathbb F_p^\times\). Omit it when \(j>i\), since that digit pair gives a zero factor in Lucas' theorem. Keep distinct digits on parallel edges. This construction processes at most \(p(a+b-\gcd(a,b))\) edges. Keep the strongly connected component \(C\) of \(s\), consisting of the states reachable from \(s\) that can also return to \(s\). For each state \(t\) in \(C\), choose any directed path within \(C\) from \(s\) to \(t\) and let \(L_t\) be the product of its weights, with \(L_s=1\) from the empty path. For every edge \(e\) within \(C\) from \(t\) to \(q\) with weight \(w_e\), compute \[R_e=L_t w_e/L_q,\qquad h=\operatorname{lcm}_{e\text{ within }C}\operatorname{ord}_{\mathbb F_p^\times}(R_e). \] Here the order is the least positive integer \(m\) with \(R_e^m=1\), and all weight arithmetic is modulo \(p\). The exact positive-index residue set is \[\{\binom{an}{bn}\bmod p : n\in\mathbb Z_{>0}\} =\{0\}\cup\{z\in\mathbb F_p^\times : z^h=1\}. \] Thus there are \(h+1\) residues, and all \(p\) residues occur exactly when \(h=p-1\). Lucas' theorem multiplies the digit weights along a complete input word, with leading zeros appended as needed to clear both carries. The resulting nonzero residues are governed by paths that start and end at \(s\). The factors \(L_t/L_q\) cancel around each return path, and the normalised edge weights generate exactly the subgroup of return-path products. The order \(h\) is therefore independent of the chosen paths. For the example \((a,b,p)=(4,2,5)\) treated by Vsemirnov, the edges from \(s\) to \((2,1)\) and back both have weight \(2\). Their product is \(4\), of order \(2\), and the residue set is \(\{0,1,4\}\). The individual edge weight \(2\) is absent from that set. Vsemirnov (2014), He and Yuan, p. 431, after Conjecture 1.5 The residue \(1\) occurs at a positive index. Choose a positive integer \(L\) with \(p^L\equiv1\pmod a\) and repeat the \(L\)-digit block for \((p^L-1)/a\) exactly \(p-1\) times, including any leading zeros in the block. The block returns both carries to zero and has nonzero weight because every digit of its upper binomial entry is \(p-1\). To obtain a positive index for zero, choose \(c\) from \(\{b,a-b\}\) with \(p\nmid c\), then take \(n=(p^L-1)/c\) for a positive integer \(L\) with \(p^L\equiv1\pmod c\) and \(p^L>a-c\). Such a choice exists because \(p\nmid a\). Every residue occurs at infinitely many positive indices, since multiplying an index by \(p^k\) for any integer \(k\ge0\) preserves its residue. To recover a positive index for a specified nonzero residue \(z\), augment each state in \(C\) with the running product in \(\mathbb F_p^\times\) and a flag recording whether a nonzero digit has appeared. Start at \(s\) with product \(1\) and the flag unset. Find a shortest path back to \(s\) with product \(z\) and the flag set. If \(z^h=1\), the digits on that path give an index \(0<n<p^{2|C|(p-1)-1}\), where \(|C|\) is the number of states in \(C\).
Authors
- Zixuan He
Institutions
- University of Glasgow (GB)
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-12-03
- DOI
- https://doi.org/10.5281/zenodo.24795315
- Primary Topic
- Advanced Mathematical Identities
- Type
- preprint