Universal Shift Congruences for Weighted Permutation Sequences
Ahaan Kallat
math.CO
Oct 11, 2026 · v1
math.NT
TL;DR
Main theorems (shift congruence, exact content formula, prime lifting, Lagrange-type theorem) are formalized in Lean 4 with Mathlib, sorry-free, with public repositories.
Abstract
The involution numbers $1,1,2,4,10,26,\ldots$ repeat modulo $3$, $5$ and $7$. We explain this, and many similar patterns, by one rule. Many sequences count permutations in which every cycle of length $m$ carries a weight $w_m$ (involutions, derangements, "sets of lists", and many others in the OEIS). Writing $A(n)$ for such a count, the rule is $A(n+k)\equiv A(n)A(k)$ modulo $\mathrm{lcm}(n,k)$. It generalizes our earlier proof of the case modulo $k$ for one such sequence, but now it holds for all weights at once, as a coefficientwise congruence between universal polynomials, and we find the largest modulus that works for the universal polynomials, $nk/\mathrm{rad}(\gcd(n,k))$, and show that nothing larger does. We then show that passing from $k$ to $pk$ behaves like raising to the $p$-th power modulo a high power of $p$, with a sharp exponent for the polynomials, which gives $A(p^r)\equiv(w_1+(p-1)w_p)^{p^{r-1}}$ modulo $p^r$ for odd $p$, and explains why the prime $2$ is special. A family of sequences defined by Lagrange inversion fits the same framework, which proves Bala's conjecture for the whole family (the single sequence A278070 had been proved earlier by an automated system) and the divisibility observed in the entries A251568 and A251569. As further applications we prove OEIS conjectures of Richman, Hanna, van Hoeij and Bala (A227937), and the theorems apply to 101 OEIS sequences, whose congruences are recorded in a supplementary catalogue. Higher-order versions of the content formula are treated in a separate paper.
Problem
Sequences counting permutations weighted by cycle lengths (involutions, derangements, many OEIS entries) show periodic patterns modulo small integers. The goal is a single explanation and the sharpest universal congruences governing them.
Approach
Weighted permutation counts are encoded by universal cycle-index polynomials C_n, and a falling-factorial recurrence is used to prove C_{n+k} ≡ C_n C_k mod lcm(n,k) by induction. Orbit counting determines the exact content nk/rad(gcd(n,k)), and a block-decomposition argument lifts congruences from k to pk. A Lagrange-inversion family is shown to consist of integer-weight sequences. Key results are formalized in Lean 4/Mathlib.
Results
The shift congruence holds with best possible universal modulus nk/rad(gcd(n,k)), and A(p^r) ≡ (w_1+(p-1)w_p)^{p^{r-1}} mod p^r for odd p. The work proves Bala's conjecture for the Lagrange family and several OEIS conjectures, applies to 101 OEIS sequences, and checks the main theorems in Lean with no sorry.
| n | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
|---|
| A(n) | 1 | 1 | 2 | 4 | 10 | 26 | 76 | 232 |
| mod 3 | 1 | 1 | 2 | 1 | 1 | 2 | 1 | 1 |
| mod 5 | 1 | 1 | 2 | 4 | 0 | 1 | 1 | 2 |
| mod 7 | 1 | 1 | 2 | 4 | 3 | 5 | 6 | 1 |
Involution numbers and their residues