Parity-Splitting Duality, Self-Contained Mod-8 Tetrachotomy, Kummer Unboundedness for p | b, and Cartier-Automaton Classification of p^2-Avoiding Generalized Motzkin Numbers for p in {3, 5, 7}
Corrected version of a screened paper. Not peer reviewed. Screening record
Upgrades ARR-2026-50P2CD4BBB8BHB29 v1 to a standalone, zero-import, universally quantified Lean 4.36.0 mechanization (lean/OV83_GeneralizedMotzkin.lean, 29/29 audited public theorems, 0 sorry, 0 warnings under -DwarningAsError=true, 0 custom axioms) paired with an exact-Z/Q stdlib-only Python verifier (src/verify_ov83_motzkin.py, pytest -W error).
Structure & key results
Manuscript structure
- Introduction
- Projective Collapse, Kummer Unboundedness for p | bp | b, and Trinomial Bridge
- Parity-Splitting Duality and Self-Contained Mod-8 Classification
- Cartier-Operator Closure over Z/p²ZZ/p2Z and Classification of p²p2-Avoiding Families for p ∈ 3, 5, 7p in 3, 5, 7
- Formal Verification, Computational Tables, and Empirical 2^k2k Telemetry
- Concluding Remarks and Open Problems
Selected results from the manuscript source
Theorem 1 — Prime-p projective structure, Kummer unboundedness for p | b, and trinomial bridge
Let p ≥ 2 be any prime and let b, c ∈ Z. ((a)) Trivial zero-valuation regime: If p | c and p nmid b, then M_n(b, c) ≡ bⁿ (mod p) for all n ≥ 0, so v_p(M_n(b, c)) = 0 identically. ((b)) Projective invariance: If p nmid b, then for every n ≥ 0, b⁻ⁿ M_n(b, c) = ∑_(k=0)^(⌊ n/2 ⌋) C(n,2k) C_k c^k =: M_n(c) ∈ Z_p, c:= c b⁻² ∈ Z_p. Hence v_p(M_n(b, c)) depends on (b, c) solely through the single p-adic invariant c = c b⁻² ∈ Z_p. In particular, for every k ≥ 1, the residue of b⁻ⁿ M_n(b, c) (mod p^k) depends only on c mod p^k.
Theorem 2 — Master mod-8 equation, c ↦ 3c duality, and self-contained mod-8 tetrachotomy
Let c be any odd integer. ((a)) Master mod-8 parity-splitting equations: In Z/8Z[[t]], A^(c)(t) & ≡ (1 + t + 5t² + 5t³)/(1 - t⁴) + c t A^(c)(t)² (mod 8), B^(c)(t) & ≡ 3 A^(c)(t) - 2/(1 - t) + 4 t² A^(c)(t)³ (mod 8). ((b)) Exact c ↦ 3c even/odd duality: In Z/8Z[[t]], B^(c)(t) ≡ A^(3c)(t) + 4(A^(c)(t) - 1/(1 - t²)) (mod 8). ((c)) Exact c ↦ c + 4 parity-flip shift: In Z/8Z[[t]], A^(c+4)(t) & ≡ A^(c)(t) + 4(A^(c)(t) - 1/(1 - t)) (mod 8), B^(c+4)(t) & ≡ B^(c)(t) + 4(B^(c)(t) - 1/(1 - t)) (mod 8).
Corollary 3 — Complete if-and-only-if classification of 4- and 8-avoidance
For integers b, c ∈ Z: ((a)) 4 nmid M_n(b, c) for all n ≥ 0 if and only if b is odd and c is even; ((b)) 8 nmid M_n(b, c) for all n ≥ 0 if and only if b is odd and c not ≡ 5, 7 (mod 8).
Theorem 4 — Formal Z/p²Z Cartier module closure and p²-avoidance classification for p ∈ 3, 5, 7
((a)) Lift-independent finite-state Cartier module closure: Let p ≥ 3 be an odd prime, let c ∈ Z be any integer lift of a unit class in (Z/p²Z)^×, let Q(x) = 1 - 2x + (1 - 4c)x² ∈ Z[x], and define R(x):= (Q(x)^p - Q(x^p))/p ∈ Z[x] (deg R ≤ 2p). The reduction R(x) mod p ∈ F_p[x] depends solely on c mod p² and is independent of the choice of integer lift c ∈ Z. Let M_p be the finite set of power series in (Z/p²Z)[[x]] of the form F_(A,B)(x):= A(x) Q(x)^(-1/2) + p B(x) Q(x)^(-3/2) (mod p²), with A ∈ (Z/p²Z)[x] of degree ≤ 2 and B ∈ F_p[x] of degree ≤ 4.
Key contributions noted in exact-version screening
- Universal zero-borrow Kummer unboundedness bound v_p(M_{2(p^r - 2)}(b, c)) >= r - 1 (and >= r for p >= 5) for all primes p >= 2 whenever p | b (Theorem 2.1(c)).
- Parity-splitting master mod-8 equations, exact c -> 3c even/odd duality, c -> c + 4 parity-flip shift, self-contained iterated parity-split proof of 8 not dividing M_n(1, 1), and complete mod-4/mod-8 tetrachotomy over all (b, c) in Z^2 (Theorem 3.1, Corollary 3.2).
- Complete Z/p^2Z Cartier classification for p in {3, 5, 7}, identifying two new 25-avoiding infinite families (c_tilde in {18, 23} mod 25) and four new 49-avoiding infinite families (c_tilde in {5, 12, 19, 25} mod 49) backed by formal certificate soundness and externally exported invariant sets (Theorem 4.1).
Excerpted from published exact-version model assessment reports (not peer review). Full reports below →
Preview PDF on this page v2
Uses your browser's PDF viewer. Open the PDF directly if a preview is unavailable.
Full manuscript text in HTML (8,458 words — searchable plain text)
AIRR.SCIENCE · ARR-2026-50P2CD4BBB8BHB29 v2 [Combinatorics] · 2026-12-06
Parity-Splitting Duality, Self-Contained Mod-8 Tetrachotomy, Kummer Unboundedness for p | b, and Cartier-Automaton Classification of p2-Avoiding Generalized Motzkin Numbers for p ∈ {3, 5, 7} Lluis Eriksson Independent Researcher, Östersund, Sweden editor@airr.science
December 6, 2026
Abstract P⌊n/2⌋ n
Ck bn−2k ck For integers b, c ∈ Z, the generalized Motzkin numbers Mn (b, c) = k=0 2k
2k 1 (where Ck = k+1 k is the k-th Catalan number) unify the classical Motzkin numbers Mn (1, 1), shifted Catalan numbers Mn (2, 1) = Cn+1 , and weighted Motzkin lattice paths. Prior work established that the classical sequence satisfies 8 ∤ Mn (1, 1) (Eu–Liu–Yeh, 2008) and 25 ∤ Mn (1, 1) (Rowland–Yassawi, 2015). Here we determine the prime-power avoidance loci across the entire two-parameter plane (b, c) ∈ Z2 for p = 2 (modulo 4 and 8) and p ∈ {3, 5, 7} (modulo p2 ), with machine-checked formal proofs of all analytic theorems and self-contained mod-8 and mod-9 classifications in standalone Lean 4.36.0: 1. Projective collapse and Kummer unboundedness for p | b (Theorem 2.1): for every prime p ≥ 2, p | c with p ∤ b forces vp (Mn (b, c)) = 0 identically; p ∤ b collapses vp (Mn (b, c)) to the single projective invariant c̃ = cb−2 ∈ Zp ; and p | b forces vp (M2(pr −2) (b, c)) ≥ r − 1 for all r ≥ 1 (and ≥ r for p ≥ 5), proving supn vp (Mn (b, c)) = +∞ via a unified zero-borrow Kummer argument. 2. Master mod-8 equation, c 7→ 3c duality, self-contained 8 ∤ Mn (1, 1), and 4-/8-avoidance classification (Theorem 3.1, Corollary 3.2): splitting M (x) = A(x2 ) + xB(x2 ) for odd 2 +5t3 (c) 2 (c) b, c yields A(c) (t) ≡ 1+t+5t (t) ≡ 1−t4 + ctA (t) (mod 8), the even/odd duality B (c) 2 −1 (c+4) (c) (3c) (mod 8), and the shift A (t) ≡ A (t)+4 A(c) (t)− A (t)+4 A (t)−(1−t )
(1 − t)−1 (mod 8). Iterating the parity split twice on A(1) (t) yields an exact self-similar (1) (1) (1) (1) mod-8 recurrence (A8j+1 ≡ 2 (mod 4), A8j+5 ≡ 4 (mod 8), A8j+7 ≡ A2j+1 (mod 8)) that proves 8 ∤ Mn (1, 1) self-containedly without external citations, completes the exact mod-8 tetrachotomy across c ∈ {1, 3, 5, 7} (mod 8), and proves that 8 ∤ Mn (b, c) for all n ≥ 0 iff b is odd and c ̸≡ 5, 7 (mod 8). 3. Formal Z/p2 Z Cartier-operator closure and p2 -avoidance classification for p ∈ {3, 5, 7} (Theorem 4.1): we prove a lift-independent finite-degree module closure for Q(x)−1/2 modulo p2 and a general soundness theorem for finite Cartier inductive invariants directly in Lean 4. Among the p(p − 1) unit projective classes c̃ = cb−2 ∈ (Z/p2 Z)× , p2 ∤ Mn (b, c) holds for 0 classes at p = 3 (fully proved in Lean 4 as an if-and-onlyif classification), exactly 3 classes at p = 5 (c̃ ∈ {1, 18, 23} (mod 25), identifying two new 25-avoiding infinite families beyond (1, 1)), and exactly 4 classes at p = 7 (c̃ ∈ {5, 12, 19, 25} (mod 49)). The p ∈ {5, 7} avoidance half is computer-certified via externally exported state-set certificates audited by a structurally independent raw-convolution verifier; all non-avoiding unit classes are refuted by explicit minimal witnesses n ≤ 14, 224, 832.
4. Verification scope (Section 5): 29 headline theorems directly on the recurrence motzkin b c n compile in standalone zero-import Lean 4.36.0 (-DwarningAsError=true, zero sorry, zero custom axioms), covering all of Theorems 2.1, 3.1, 4.1(a), Corollary 3.2, the p = 3 classification of Theorem 4.1(b), and Cartier certificate soundness; the p ∈ {5, 7} certificates and empirical 2k telemetry are verified by a pure-stdlib zero-float Python suite (6/6 tests under pytest -W error).
Introduction
Given integer step weights b, c ∈ Z, the generalized Motzkin numbers Mn (b, c) are defined for n ≥ 0 by the binomial-Catalan transform ⌊n/2⌋
Mn (b, c) :=
X k=0
n Ck bn−2k ck , 2k
1 2k Ck := . k+1 k !
Combinatorially, when b, c ≥ 0, Mn (b, c) counts lattice paths from (0, 0) to (n, 0) staying weakly above the x-axis using up steps (1, 1) of weight 1, horizontal steps (1, 0) of weight b, and down P steps (1, −1) of weight c. Their ordinary generating function M (x) = n≥0 Mn (b, c)xn ∈ Z[[x]] satisfies the quadratic functional equation cx M (x) − (1 − bx)M (x) + 1 = 0, 2
M (x) =
1 − bx −
(1 − bx)2 − 4cx2 2cx2
(c ̸= 0),
while at c = 0 the functional equation reduces to M (x) = (1 − bx)−1 and Mn (b, 0) = bn . Equivalently, Mn (b, c) is defined by the convolution recurrence M0 (b, c) = 1, M1 (b, c) = b, P Mn+2 (b, c) = bMn+1 (b, c) + c nk=0 Mk (b, c)Mn−k (b, c) (proved equivalent to (1) in Lean 4 as motzkin_binomial_formula), and satisfies the three-term holonomic recurrence (n + 2)Mn (b, c) = b(2n + 1)Mn−1 (b, c) + (4c − b2 )(n − 1)Mn−2 (b, c)
(n ≥ 2),
with M0 (b, c) = 1 and M1 (b, c) = b. Special cases include the classical Motzkin numbers Mn (1, 1), shifted Catalan numbers Mn (2, 1) = Cn+1 , and scaled Schröder-type sequences such as Mn (3, 2) and Mn (2, 2). The arithmetic of classical Motzkin numbers Mn = Mn (1, 1) modulo primes and prime powers has been extensively investigated. Deutsch and Sagan [2] characterized Mn mod 2 and Mn mod 3 via base-p digit expansions and conjectured that no classical Motzkin number is divisible by 8. Eu, Liu, and Yeh [3] resolved this conjecture by determining Mn (1, 1) mod 4 and Mn (1, 1) mod 8 and proving 8 ∤ Mn (1, 1) for all n ≥ 0, followed by shorter structural classifications of Mn (1, 1) mod 8 by Wang and Xin [9] and modulo arbitrary powers of 2 by Krattenthaler and Müller [5]. Building on Christol’s theorem [1] and algebraic Cartier operators on diagonals of rational functions, Rowland and Yassawi [7] developed a systematic automatic-congruence algorithm and proved in particular that 25 ∤ Mn (1, 1) for all n ≥ 0 (while observing no further prime-power exclusions among the small moduli they examined for Mn (1, 1)). For the two-parameter generalization, Sun [8] established supercongruences and divisibility properties for generalized central trinomial coefficients Tn (b, c) = [x0 ](x + b + cx−1 )n and related Motzkin sequences, and Kohen [4] studied the modulo-p zero densities of generalized Motzkin numbers via reduction to Tn (b, c) mod p. Extending the prime-power avoidance picture from the single classical point (1, 1) to the full two-parameter plane (b, c) ∈ Z2 raises three concrete questions: • Which pairs (b, c) ∈ Z2 satisfy 4 ∤ Mn (b, c) or 8 ∤ Mn (b, c) for all n ≥ 0, and what is the exact behavior of v2 (Mn (b, c)) on all odd (b, c)? • For odd primes p, which pairs (b, c) ∈ Z2 satisfy p2 ∤ Mn (b, c) for all n ≥ 0? In particular, is Rowland–Yassawi’s 25 ∤ Mn (1, 1) an isolated phenomenon, or do further nontrivial 25-avoiding and 49-avoiding infinite families exist? 2
• When p | b, can vp (Mn (b, c)) ever remain bounded? We resolve these questions for p = 2 (modulo 4 and 8) and p ∈ {3, 5, 7} (modulo p2 ) across all (b, c) ∈ Z2 , and establish prime-p projective collapse and Kummer unboundedness for p | b valid for every prime p ≥ 2. While the odd-prime avoidance method adapts the Cartier-operator framework of Rowland and Yassawi [7], our contributions are fourfold: (i) the general p | b zero-borrow Kummer unboundedness bound for every prime p, (ii) the parity-splitting master mod-8 equation, c 7→ 3c even/odd duality, c 7→ c + 4 shift, and a self-contained algebraic proof of 8 ∤ Mn (1, 1) and the mod-8 tetrachotomy across all (b, c) ∈ Z2 , (iii) an explicit lift-independent degree-(2, 4) Cartier module reduction over Z/p2 Z[[x]] identifying two new 25-avoiding infinite families and four new 49-avoiding infinite families, and (iv) a standalone zero-import Lean 4.36.0 formalization of all analytic theorems, the complete mod-4, mod-8, and mod-9 classifications, and the soundness of finite Cartier certificates, paired with externally exported certificates audited by a structurally independent zero-float Python verifier.
Projective Collapse, Kummer Unboundedness for p | b, and Trinomial Bridge
Throughout, vp (m) denotes the p-adic valuation of m ∈ Z \ {0} (with vp (0) = +∞), and Tn (b, c) := [x0 ](x + b + cx−1 )n denotes the n-th generalized central trinomial coefficient, whose
−1/2 P generating function is T (x) = n≥0 Tn (b, c)xn = (1 − bx)2 − 4cx2 . Theorem 2.1 (Prime-p projective structure, Kummer unboundedness for p | b, and trinomial bridge). Let p ≥ 2 be any prime and let b, c ∈ Z. (a) Trivial zero-valuation regime: If p | c and p ∤ b, then Mn (b, c) ≡ bn (mod p) for all n ≥ 0, so vp (Mn (b, c)) = 0 identically. (b) Projective invariance: If p ∤ b, then for every n ≥ 0, ⌊n/2⌋ −n
Mn (b, c) =
X k=0
n Ck c̃k =: M̃n (c̃) ∈ Zp , 2k
c̃ := cb−2 ∈ Zp .
Hence vp (Mn (b, c)) depends on (b, c) solely through the single p-adic invariant c̃ = cb−2 ∈ Zp . In particular, for every k ≥ 1, the residue of b−n Mn (b, c) (mod pk ) depends only on c̃ mod pk . (c) Zero-borrow Kummer unboundedness for p | b: If p | b, then for every c ∈ Z and every integer r ≥ 1, vp M2(pr −2) (b, c) ≥ r − 1
(and ≥ r whenever p ≥ 5).
In particular, supn≥0 vp (Mn (b, c)) = +∞ whenever p | b. (d) Central-trinomial bridge: For all (b, c) ∈ Z2 (including c = 0) and all n ≥ 0, 2c(n + 2)Mn (b, c) = b Tn+1 (b, c) + (4c − b2 ) Tn (b, c).
Proof. Parts (a) and (b) follow directly from (1) (and from the recurrence in Lean 4: motzkin_ mod_p_zero_c, motzkin_projective_scaling, and motzkin_projective_mod): when p | c, n every k ≥ 1 summand vanishes modulo p, leaving bn ; when p ∤ b, b ∈ Z× p and factoring out b n−2k k −2 k k replaces b c by (cb ) = c̃ .
For (c), set m := pr − 2 (r ≥ 1). For r = 1 and p = 2, m = 0 gives v2 (M0 ) = 0 ≥ 0. Assume now m ≥ 1 (which holds for all p ≥ 3, r ≥ 1 and p = 2, r ≥ 2). In (1) at n = 2m, M2m (b, c) =
m X k=0
2m Ck b2(m−k) ck . 2k !
We lower-bound the p-adic valuation of every summand 0 ≤ k ≤ m. Set d := m − k ∈ {0, 1, . . . , pr − 2}. Because p | b, the factor b2d contributes at least 2d to the p-adic valuation. If d + 1 = pr − 1 (i.e., k = 0), then 2d = 2(pr − 2) ≥ r for all pr ≥ 3 (and 2d = 0 = r − 1 when p = 2, r = 1). Otherwise 1 ≤ d + 1 < pr , and there is a unique integer ℓ ∈ {1, . . . , r} such that pℓ−1 ≤ d + 1 < pℓ . ℓ−1 j j Write pr − 1 = r−1 j=0 (p − 1)p and d + 1 = j=0 aj p (0 ≤ aj ≤ p − 1). Because every base-p digit of pr − 1 is p − 1, subtracting d + 1 from pr − 1 incurs zero borrows, so the integer k = (pr − 1) − (d + 1) has all top r − ℓ base-p digits (at positions j = ℓ, ℓ + 1, . . . , r − 1) identically equal to p − 1. Since 2(p − 1) ≥ p for every prime p ≥ 2, adding k + k in
base p generates a carry 2k at every position j ∈ {ℓ, . . . , r − 1}; by Kummer’s theorem [6], vp k ≥ r − ℓ. Meanwhile, k + 1 = pr − (d + 1) with 1 ≤ d + 1 < pℓ ≤ pr satisfies vp (k + 1) = vp (d + 1) ≤ ℓ − 1. Hence
vp (Ck ) = vp
2k k
− vp (k + 1) ≥ (r − ℓ) − (ℓ − 1) = r + 1 − 2ℓ.
Adding the contribution 2d from b2d and using d + 1 ≥ pℓ−1 ≥ ℓ (since pℓ−1 ≥ ℓ for all p ≥ 2, ℓ ≥ 1), we obtain 2m Ck b2d ck 2k !
≥ 2d + r + 1 − 2ℓ ≥ 2(ℓ − 1) + r + 1 − 2ℓ = r − 1.
When p ≥ 5, if d = 0 then k = pr − 2 has units digit p − 2 ≥ (p + 1)/2, contributing one additional carry at j = 0 so vp (Ck ) ≥ r; if d ≥ 1 and ℓ = 1 then 2d + r − 1 ≥ r + 1; and if ℓ ≥ 2 then d ≥ pℓ−1 − 1 ≥ 5ℓ−1 − 1 ≥ 2ℓ for all ℓ ≥ 2, giving 2d + r + 1 − 2ℓ ≥ r + 1. Thus vp (M2(pr −2) (b, c)) ≥ r for all p ≥ 5. Both cases are formalized end-to-end directly on motzkin in Lean 4 (kummer_unbounded_div and kummer_unbounded_div_ge5). For (d), when c = 0, Tn (b, 0) = bn and both sidespof (5) vanish identically (0 = b·bn+1 −b2 ·bn ). For c = ̸ 0, multiplying (2) by 2cx2 and rewriting Q(x) = Q(x)T (x) where Q(x) = 1 − 2bx + (b2 − 4c)x2 gives
2cx2 M (x) = 1 − bx − 1 − 2bx + (b2 − 4c)x2 T (x). Extracting [xn+2 ] for any n ≥ 0 gives 2cMn (b, c) = −Tn+2 (b, c) + 2bTn+1 (b, c) − (b2 − 4c)Tn (b, c). Substituting the standard three-term trinomial recurrence (n+2)Tn+2 (b, c) = b(2n+3)Tn+1 (b, c)+ (4c − b2 )(n + 1)Tn (b, c) yields 2c(n + 2)Mn (b, c) = 2b(n + 2) − b(2n + 3) Tn+1 (b, c) + (4c − b2 ) (n + 2) − (n + 1) Tn (b, c),
which simplifies directly to (5) (proved for all (b, c) ∈ Z2 without case-splitting on c = 0 in Lean 4 as trinomial_bridge). Remark 2.2 (Tested sharpness of (4)). The lower bound (4) is attained with equality across all tested exponents: at (b, c) = (2, 1) (shifted Catalan Cn+1 , tested for 1 ≤ r ≤ 9) and (3, 1) (1 ≤ r ≤ 6), vp (M2(pr −2) (p, 1)) = r − 1; at (5, 1) (1 ≤ r ≤ 4) and (7, 1) (1 ≤ r ≤ 3), vp (M2(pr −2) (p, 1)) = r (Section 5). Sample exact-valuation witnesses checking both divisibility by pv and non-divisibility by pv+1 are verified directly on motzkin in Lean 4 (witness_kummer_ sharp_examples). Proving exact equality for all r ≥ 1 and all primes p remains open. 4
Parity-Splitting Duality and Self-Contained Mod-8 Classification
We now determine v2 (Mn (b, c)) modulo 8 across all (b, c) ∈ Z2 . By Theorem 2.1(a)–(c), the only remaining case is b odd and c odd. Since every odd b satisfies b2 ≡ 1 (mod 8), Theorem 2.1(b) yields c̃ = cb−2 ≡ c (mod 8), so v2 (Mn (b, c)) up to ≥ 3 depends solely on c mod 8, and we may (c) normalize to b = 1 and write Mn := Mn (1, c). P (c) Split the generating function M (c) (x) = n≥0 Mn xn into its even and odd parts: M (c) (x) = A(c) (x2 ) + xB (c) (x2 ),
A(c) (t) :=
B (c) (t) :=
M2m tm ,
M2m+1 tm .
For any integer n ≥ 0, write ⌊(n + 2)/2⌋ = 2e u with e ≥ 0 and u odd, and define the parity indicator ε(n) := 1[n odd] ⊕ 1[u ≡ 3 (mod 4)] ∈ {0, 1}. (6) Theorem 3.1 (Master mod-8 equation, c 7→ 3c duality, and self-contained mod-8 tetrachotomy). Let c be any odd integer. (a) Master mod-8 parity-splitting equations: In Z/8Z[[t]], 1 + t + 5t2 + 5t3 + ct A(c) (t)2 (mod 8), 1 − t4 2 B (c) (t) ≡ 3A(c) (t) − + 4t2 A(c) (t)3 (mod 8). 1−t A(c) (t) ≡
(7) (8)
(b) Exact c 7→ 3c even/odd duality: In Z/8Z[[t]],
B (c) (t) ≡ A(3c) (t) + 4 A(c) (t) −
1 1 − t2
(mod 8).
(mod 8),
(10)
(mod 8).
(11)
(c) Exact c 7→ c + 4 parity-flip shift: In Z/8Z[[t]], 1 1−t
1 B (c+4) (t) ≡ B (c) (t) + 4 B (c) (t) − 1−t
A(c+4) (t) ≡ A(c) (t) + 4 A(c) (t) −
(d) Self-contained mod-8 tetrachotomy: For every odd b, every odd c, and every n ≥ 0 with ⌊(n + 2)/2⌋ = 2e u (u odd): • If e is even (natural density 2/3), then v2 (Mn (b, c)) = 0. • If e is odd (natural density 1/3), then: c≡1
(mod 8) :
v2 (Mn (b, c)) = 1 + ε(n) ∈ {1, 2},
(mod 8) :
v2 (Mn (b, c)) = 2 − ε(n) ∈ {1, 2},
(mod 8) :
v2 (Mn (b, c)) = 1 if ε(n) = 0,
v2 (Mn (b, c)) ≥ 3 if ε(n) = 1,
(mod 8) :
v2 (Mn (b, c)) ≥ 3 if ε(n) = 0,
v2 (Mn (b, c)) = 1 if ε(n) = 1.
In particular, 8 ∤ Mn (1, 1) for all n ≥ 0, no term with c ≡ 5, 7 (mod 8) has v2 (Mn (b, c)) = 2, and the set {n ≥ 0 : 8 | Mn (b, c)} has exact natural density 1/6 for c ≡ 5, 7 (mod 8).
Proof. (a) Substitute M (c) (x) = A(x2 ) + xB(x2 ) into cx2 M 2 − (1 − x)M + 1 = 0 and separate even and odd powers of x (setting t = x2 ): A(t) = 1 + ctA(t)2 + tB(t) + ct2 B(t)2 , B(t) = A(t) + 2ctA(t)B(t) =⇒ B(t) =
(12) A(t) . 1 − 2ctA(t)
(13)
(mod 8),
(14)
Expanding (13) modulo 8 gives B(t) ≡ A(t) + 2ctA(t)2 + 4t2 A(t)3
whence B(t)2 ≡ A(t)2 + 4ctA(t)3 + 4t2 A(t)4 (mod 8). Substituting into (12) yields (1 − t)A(t) ≡ 1 + ct(1 + 3t)A(t)2 + 4(1 + c2 )t3 A(t)3 + 4ct4 A(t)4
(mod 8).
Since c is odd, c2 ≡ 1 (mod 8), so 4(1 + c2 ) ≡ 0 (mod 8) and 4c ≡ 4 (mod 8). Thus the A(t)3 term cancels identically modulo 8. Writing 1 + 3t = (1 − t) + 4t and using the Frobenius congruences 4A(t)2 ≡ 4A(t2 ) (mod 8) and 4A(t)4 ≡ 4A(t4 ) (mod 8), we obtain (1 − t)A(t) ≡ 1 + ct(1 − t)A(t)2 + 4t2 A(t2 ) + 4t4 A(t4 )
(mod 8).
(15)
Reducing (15) modulo 2 and dividing by 1 − t gives the mod-2 master equation A(t) + tA(t)2 ≡
1 1−t
(mod 2).
(16)
Replacing t 7→ t2 in (16) yields t2 A(t4 ) ≡ A(t2 ) + (1 − t2 )−1 (mod 2); multiplying by 4t2 collapses the last two terms of (15) to 4t2 A(t2 ) + 4t4 A(t4 ) ≡ 4t2 2A(t2 ) + (1 − t2 )−1 ≡
4t2 1 − t2
(mod 8).
1 m 1+t Dividing (15) by 1 − t and using the coefficient parity [tm ] (1−t)(1−t 2 ) = ⌊m/2⌋ + 1 ≡ [t ] 1−t4 2
4t (1+t) 4t (mod 8)) gives (mod 2) (so (1−t)(1−t 2) ≡ 1−t4
A(t) ≡
1 4t2 1 + t + 5t2 + 5t3 + + ctA(t)2 ≡ + ctA(t)2 2 1 − t (1 − t)(1 − t ) 1 − t4
(mod 8),
2 proving (7). Multiplying (7) by 2 gives 2ctA(t)2 ≡ 2A(t) − 1−t (mod 8); substituting this into (14) yields (8) (Lean 4: master_A_mod8, master_B_mod8). (b) Set A := A(c) (t), S := (1 − t)−1 , and define
e A(t) := B (c) (t) + 4 A −
1 1 − t2
≡ 3A − 2S + 4 t2 A3 + A + S 2
(mod 8),
where we used (8) and (1−t2 )−1 ≡ S 2 (mod 2). Since (X +4Y )2 ≡ X 2 (mod 8) and (3A−2S)2 = 9A2 − 12AS + 4S 2 ≡ A2 + 4AS + 4S 2 (mod 8), multiplying by 3ct (noting 3c · 4 ≡ 4 (mod 8)) yields e 2 ≡ 3ctA2 + 4tAS + 4tS 2 (mod 8). 3ctA(t) On the other hand, multiplying the master equation (7) by 3 (using 3 · 4 ≡ 4 (mod 8)) gives 3ctA2 ≡ 3A − 3S −
4t2 (1 − t)(1 − t2 )
(mod 8).
4t 4t 1+t+5t +5t e 2 , the Adding S + (1−t)(1−t (mod 8) to 3ctA(t) terms cancel identically 2) ≡ 1−t4 (1−t)(1−t2 ) modulo 8, leaving
1 + t + 5t2 + 5t3 e 2≡ + 3ctA(t) 1 − t4
4t2 S+ (1 − t)(1 − t2 )
4t2 + 3A − 3S − (1 − t)(1 − t2 )
+ 4tAS + 4tS 2 ≡ 3A − 2S + 4tAS + 4tS 2
(mod 8).
In F2 [[t]], equation (16) gives tA2 ≡ A + S, hence t2 A3 + A + S 2 ≡ tA(A + S) + A + S 2 = (A + S) + tAS + A + S 2 = tAS + S(1 + S) = tAS + tS 2
(mod 2),
e satisfies (7) because S(1+S) = (1+t)−1 (1+(1+t)−1 ) = t(1+t)−2 = tS 2 in F2 [[t]]. Therefore A(t) with parameter 3c. Since the formal power series equation X(t) = g(t) + 3ctX(t)2 uniquely e determines every coefficient [tm ]X(t) by induction on m ≥ 0, we conclude A(t) ≡ A(3c) (t) (mod 8), proving (9) (Lean 4: duality_3c_mod8). (c) Since c + 4 ≡ c (mod 4), equation (7) modulo 4 gives A(c+4) (t) ≡ A(c) (t) (mod 4). Thus (c+4) A − A(c) ≡ 0 (mod 4) and A(c+4) + A(c) ≡ 0 (mod 2), so their product vanishes modulo 8. Subtracting (7) at c from c + 4 yields
(c+4)
1 (t) − A (t) ≡ 4tA (t) ≡ 4 A (t) − 1−t (c)
(mod 8),
by (16), proving (10). For (11), since 3(c + 4) ≡ 3c + 4 (mod 8) and A(c+4) ≡ A(c) ≡ B (c) (mod 2), applying (9) and (10) gives B (c+4) (t) − B (c) (t) ≡ A(3c+4) (t) − A(3c) (t)
1 1 (3c) (c) ≡ 4 A (t) − ≡ 4 B (t) − 1−t 1−t
(mod 8),
formalized in Lean 4 as shift_4_mod8. (c) (c) (c) (d) Extracting [tm ] from (16) gives A2k ≡ 1 (mod 2) and A2k+1 ≡ 1 − Ak (mod 2). By (c)
strong induction on m, Am ≡ 0 (mod 2) ⇐⇒ v2 (m + 1) is odd; since B (c) (t) ≡ A(c) (t) (c) (mod 2), the same holds for Bm (Lean 4: motzkin_mod2_parity_law). For n ∈ {2m, 2m + 1}, ⌊(n + 2)/2⌋ = m + 1, so 2 | Mn (b, c) ⇐⇒ e = v2 (⌊(n + 2)/2⌋) is odd, which has natural density P −(2j+2) = 1/3. j≥0 2 We now prove the exact c ≡ 1 (mod 8) valuation law self-containedly directly from (7)–(8) (independently recovering 8 ∤ Mn (1, 1) of Eu–Liu–Yeh [3] and Wang–Xin [9]). Write A(t) := A(1) (t) = A0 (t2 ) + tA1 (t2 ) and set F (u) := 1+5u . Separating even and odd powers of t in (7) at 1−u2 c = 1 yields, modulo 8, A0 (u) ≡ F (u) + 2uA0 (u)A1 (u),
A1 (u) ≡ F (u) + A0 (u)2 + uA1 (u)2
(mod 8).
Setting W (u) := uA0 (u)A1 (u), we have A0 (u) ≡ F (u) + 2W (u) (mod 4), hence A0 (u)2 ≡
2 2 F (u) + 4 F (u)W (u) + W (u) (mod 8). Direct convolution gives [uk ]F (u)2 ≡ k + 1 (mod 8), while A0 (u) ≡ F (u) ≡ (1 − u)−1 (mod 2) gives W (u) ≡ u(1 − u)−1 A1 (u) (mod 2) and therefore F (u)W (u) + W (u)2 ≡ u(1 − u)−2 A1 (u) + uA1 (u)2
(mod 2).
Using A2k+1 ≡ 1 + Ak (mod 2) together with Frobenius squaring shows [uk ](A1 (u) + uA1 (u)2 ) ≡
k −2 2 1[k odd] (mod 2), whence [u ] u(1−u) (A1 +uA1 ) ≡ 1[k ≡ 2 (mod 4)] (mod 2). Substituting back into A1 (u) yields the closed-form mod-8 equation (Lean 4: evenM1_odd_slice_mod8): A1 (u) ≡ G(u) + uA1 (u)2
(mod 8),
[u ]G(u) := 1 + 41[k odd] + (k + 1) + 41[k ≡ 2 k
(17)
(mod 4)]. (1)
Splitting (17) once more into A1 (u) = E(u2 ) + uO(u2 ) (so Ev = A4v+1 and Ov = A4v+3 ) yields: 7
• On the even slice: Ev ≡ 2(v + 1) + 41[v odd] + 2[v − 1](E · O) (mod 8). Because Ev is even for all v, reducing modulo 4 gives Ev ≡ 21[v even] (mod 4), which collapses the convolution P mod 8 to Ev ≡ 2(v + 1) + 41[v odd] + 4 i<v, i even Ov−1−i (mod 8). Evaluating at v = 2j (1)
gives A8j+1 ≡ 2 + 4
(1) i=0 Ai ≡ 2 (mod 4); evaluating at v = 2j + 1 uses O2r ≡ A2r ≡ 1
Pj−1
(mod 2) to give A8j+5 ≡ 4(j + 1) + 4 + 4(j + 1) ≡ 4 (mod 8). • On the odd slice: O(v) satisfies O(v) ≡ constO (v) + vO(v)2 (mod 8) with [v k ]constO (v) = 3, 1, 3, 5 for k ≡ 0, 1, 2, 3 (mod 4) (using [v k ]E(v)2 ≡ 41[k ≡ 0 (mod 4)] (mod 8)). Setting D(v) := O(v) − A(v) gives Dv ≡ 21[v even] (mod 4) and consequently [v 2j+1 ](2vAD + (1) (1) vD2 ) ≡ 0 (mod 8), yielding D2j+1 ≡ 0 (mod 8), i.e., A8j+7 ≡ A2j+1 (mod 8) (Lean 4: evenM1_mod8_rec). (1)
• Substituting into (8) (and using the Thue–Morse prefix parity i<2k Ai ≡ i<k Ai (1) (mod 2)) immediately gives the companion odd-index recurrences B8j+1 ≡ 4 (mod 8), P
B8j+5 ≡ 2 (mod 4), and B8j+7 ≡ B2j+1 (mod 8) (Lean 4: oddM1_mod8_rec). By strong induction on m ≥ 0, every odd-v2 (m + 1) index satisfies m ≡ 1, 5, or 7 (mod 8): m = 8j + 1 has u = 4j + 1 ≡ 1 (mod 4) (giving v2 (Am ) = 1, v2 (Bm ) = 2); m = 8j + 5 has u = 4j + 3 ≡ 3 (mod 4) (giving v2 (Am ) = 2, v2 (Bm ) = 1); and m = 8j + 7 satisfies m + 1 = 4 (2j + 1) + 1 , preserving both the parity of v2 (m + 1) and the odd part u, reducing mod 8 directly to 2j + 1. This establishes the exact c ≡ 1 (mod 8) law v2 (Mn (b, c)) = 1 + ε(n) ∈ {1, 2} and in particular 8 ∤ Mn (1, 1) for all n ≥ 0 (Lean 4: motzkin_1_1_mod8_exact and motzkin_1_ 1_not_div_8). (c) Now observe that whenever e = v2 (m + 1) is odd, m is odd and Am is even, so [tm ] A(c) (t) − (c)
(1 − t2 )−1 = Am ≡ 0 (mod 2). Hence duality (9) gives the exact congruence
(c) Bm ≡ A(3c) m
(mod 8)
(3c) A(c) m ≡ Bm
(mod 8)
at every even-Mn index n ∈ {2m, 2m + 1}. Since flipping n between 2m and 2m + 1 flips ε(n) 7→ 1 − ε(n), setting c = 1 proves the c ≡ 3 (mod 8) law v2 (Mn (b, c)) = 2 − ε(n) ∈ {1, 2}. (c) (c) Finally, at every even-Mn index, Am − 1 ≡ Bm − 1 ≡ 1 (mod 2), so (10)–(11) simply add +4 (mod 8): every v2 = 1 residue (±2 (mod 8)) stays ∓2 (mod 8) (v2 = 1), while every v2 = 2 residue (4 (mod 8)) shifts to 4 + 4 ≡ 0 (mod 8) (v2 ≥ 3). Applying this +4 shift to c ≡ 1 gives c ≡ 5 (mod 8), and applying it to c ≡ 3 gives c ≡ 7 (mod 8) (Lean 4: mod8_tetrachotomy). Because u ≡ 1 and u ≡ 3 (mod 4) occur equally often among odd u, each value ε(n) ∈ {0, 1} has exact density 12 · 13 = 16 . Corollary 3.2 (Complete if-and-only-if classification of 4- and 8-avoidance). For integers b, c ∈ Z: (a) 4 ∤ Mn (b, c) for all n ≥ 0 if and only if b is odd and c is even; (b) 8 ∤ Mn (b, c) for all n ≥ 0 if and only if b is odd and c ̸≡ 5, 7 (mod 8). Proof. If b is even, Theorem 2.1(c) gives 4 | M12 (b, c) and 8 | M28 (b, c). If b is odd and c is even, Theorem 2.1(a) gives v2 (Mn (b, c)) = 0 for all n ≥ 0. If b and c are both odd, Theorem 3.1(d) shows 4 | M2 (b, c) when c ≡ 3, 7 (mod 8) and 4 | M3 (b, c) when c ≡ 1, 5 (mod 8) (proving (a)), while v2 (Mn (b, c)) ≤ 2 for all n ≥ 0 when c ≡ 1, 3 (mod 8), whereas 8 | M3 (b, c) when c ≡ 5 (mod 8) and 8 | M2 (b, c) when c ≡ 7 (mod 8) (proving (b)). Both parts are formalized directly on motzkin in Lean 4 as not_div_4_iff and not_div_8_iff. Remark 3.3 (Mod-4 pair-count and (En , On ) viewpoints). Two complementary perspectives P illuminate Theorem 3.1(d). First, setting Φ(t) := k≥0, v2 (k+1) even tk , reducing (7) modulo 4 8
yields A(1) (t) ≡ (1 − t)−1 + tΦ(t)2 (mod 4), and counting pairs {a, K − a} with even 2-adic 2(4j −1) valuations at K = 2 ·4j u gives the exact closed-form identity N (2·4j u) = u−1 u, yielding 2 + 3 (1)
Am ≡ 1 + u (mod 4) directly (cross-checked in Python). Second, splitting (1) into even-k and P P n
odd-k sums En := k even 2k Ck and On := k odd 2k Ck gives b−n Mn (b, c) ≡ En + cOn (mod 8), where ε(n) = 0 corresponds to En ≡ On (mod 8) and ε(n) = 1 to En + On ≡ 4 (mod 8) (Lean 4: mod8_tetrachotomy_typeI, mod8_tetrachotomy_typeII).
Cartier-Operator Closure over Z/p2 Z and Classification of p2 -Avoiding Families for p ∈ {3, 5, 7}
We now turn to odd primes p ≥ 3. By Theorem 2.1(a)–(c), any pair (b, c) ∈ Z2 with p | b has supn vp (Mn (b, c)) = +∞, any pair with p | c and p ∤ b satisfies vp (Mn (b, c)) = 0 identically, and for p ∤ bc the divisibility condition p2 | Mn (b, c) depends solely on the single unit projective invariant c̃ = cb−2 ∈ (Z/p2 Z)× (p(p − 1) classes). Thus we normalize to b = 1 and any integer lift c ∈ Z with p ∤ c. Define the quadratic polynomial Q(x) := (1 − x)2 − 4cx2 = 1 − 2x + (1 − 4c)x2 ∈ Z[x] and the integer formal power series Q(x)1/2 := 1 − x − 2cx2 M (c) (x) ∈ Z[[x]]. By (2) (proved directly
2 over Z[[x]] in Lean 4 as sqrtQ_sq), Q(x)1/2 = Q(x) and for every n ≥ 0, [xn+2 ]Q(x)1/2 = −2cMn (1, c). Since p is odd and p ∤ c, −2c is a unit modulo p2 , so p2 | Mn (1, c) if and only if [xn+2 ]Q(x)1/2 ≡ 0 (mod p2 ).
P m := a x Recall the Cartier operators Λr : R[[x]] → R[[x]] (0 ≤ r < p) defined by Λ r m m≥0
P j p j≥0 apj+r x , which satisfy the projection property Λr f (x)g(x ) = Λr (f (x))g(x) (Lean 4: cartierLambda_mul_frob) and extract any coefficient [xm ]f (x) as the constant term [x0 ](Λdk ◦ P · · · ◦ Λd0 )(f ) for the base-p expansion m = ki=0 di pi . Theorem 4.1 (Formal Z/p2 Z Cartier module closure and p2 -avoidance classification for p ∈ {3, 5, 7}). (a) Lift-independent finite-state Cartier module closure: Let p ≥ 3 be an odd prime, let c ∈ Z be any integer lift of a unit class in (Z/p2 Z)× , let Q(x) = 1 − 2x + (1 − 4c)x2 ∈ Z[x], and define Q(x)p − Q(xp ) R(x) := ∈ Z[x] (deg R ≤ 2p). p The reduction R(x) mod p ∈ Fp [x] depends solely on c mod p2 and is independent of the choice of integer lift c ∈ Z. Let Mp be the finite set of power series in (Z/p2 Z)[[x]] of the form FA,B (x) := A(x) Q(x)−1/2 + p B(x) Q(x)−3/2 (mod p2 ), with A ∈ (Z/p2 Z)[x] of degree ≤ 2 and B ∈ Fp [x] of degree ≤ 4. Then Q(x)1/2 = FQ,0 (x) ∈ Mp , Mp is closed under every Cartier operator Λr (0 ≤ r < p) via the explicit transition map Λr (FA,B ) ≡ FA′ ,B ′ (mod p2 ), A′ (x) := Λr A(x)Q(x)(p−1)/2
(18)
(mod p2 ),
B ′ (x) := Λr B(x)Q(x)(3p−3)/2 − 12 A(x)R(x)Q(x)
(p−1)/2
(mod p),
with deg A′ ≤ 1 ≤ 2, deg B ′ ≤ 3 ≤ 4, and constant term [x0 ]FA,B (x) ≡ A(0) + pB(0) (mod p2 ). Moreover, any finite set of tagged states (A, B, cls) (cls ∈ {init, eq0, eq1, ge2}) containing (Q, 0, init), closed under (18), and satisfying A(0) + pB(0) ̸≡ 0 (mod p2 ) on every ge2 state proves p2 ∤ Mn (1, c) for all n ≥ 0. 9
(b) If-and-only-if classification for p ∈ {3, 5, 7}: For integers b, c ∈ Z, the condition p2 ∤ Mn (b, c) for all n ≥ 0 holds if and only if either (p | c and p ∤ b), or p ∤ bc and c̃ = cb−2 (mod p2 ) lies in: • p = 3: ∅ (0 of 6 unit classes; every unit class hits 9 | Mn at n ≤ 14, giving a complete Lean 4 classification not_div_9_iff); • p = 5: {1, 18, 23} (mod 25) (3 of 20 unit classes, computer-certified by externally exported and independently audited exact Cartier state-set invariants of 632, 577, 577 reachable states; all 17 remaining unit classes hit 25 | Mn at explicit minimal witnesses n ≤ 224); • p = 7: {5, 12, 19, 25} (mod 49) (4 of 42 unit classes, computer-certified by externally exported and independently audited exact Cartier state-set invariants of 1231, 1327, 1327, 2122 reachable states; all 38 remaining unit classes hit 49 | Mn at explicit minimal witnesses n ≤ 832). Proof. (a) By Fermat’s little theorem and the binomial theorem over Z[[x]], Q(x)p ≡ Q(xp ) (mod p) (Lean 4: Qpoly_frob_mod_p), so R(x) = (Q(x)p − Q(xp ))/p ∈ Z[x] has integer coefficients and deg R ≤ 2p. If c′ ≡ c (mod p2 ), then Qc′ (x) ≡ Qc (x) (mod p2 ), whence both Qc′ (x)p ≡ Qc (x)p (mod p2 ) and Qc′ (xp ) ≡ Qc (xp ) (mod p2 ); dividing the difference by p shows Rc′ (x) ≡ Rc (x) (mod p), establishing lift independence (Lean 4: Rpoly_lift_independent). Let Q(x)−1/2 ∈ Z[[x]] be the multiplicative inverse of Q(x)1/2 (with constant term 1), let Q(x)−3/2 := (Q(x)−1/2 )3 , and let ι2 := (p + 1)/2 ∈ Z satisfy 2ι2 ≡ 1 (mod p). Define RHS(x) := Q(x)(p−1)/2 Q(xp )−1/2 − pι2 R(x)Q(x)(p−1)/2 Q(xp )−3/2 ∈ Z[[x]], and set U (x) := Q(x)1/2 RHS(x). Since R(0) = 0, U (0) = 1, and expanding U (x)2 = Q(x)RHS(x)2 modulo p2 using 2pι2 = p + p2 ≡ p (mod p2 ) and Q(x)p = Q(xp ) + pR(x) gives U (x)2 ≡ Q(x)p Q(xp )−1 − pR(x)Q(xp )−2
≡ Q(xp ) + pR(x) Q(xp )−1 − pR(x)Q(xp )Q(xp )−2 = 1
(mod p2 ).
Since p2 is odd, the unique formal power series U ∈ (Z/p2 Z)[[x]] with U (0) ≡ 1 and U 2 ≡ 1 (mod p2 ) is U ≡ 1 (mod p2 ); multiplying by Q(x)−1/2 yields Q(x)−1/2 ≡ RHS(x) (mod p2 ). The same squaring argument modulo p gives Q(x)−3/2 ≡ Q(x)(3p−3)/2 Q(xp )−3/2 (mod p), hence pQ(x)−3/2 ≡ pQ(x)(3p−3)/2 Q(xp )−3/2 (mod p2 ). Substituting both into FA,B (x) and pulling Q(xp )−1/2 and Q(xp )−3/2 outside Λr via the projection property proves (18) (Lean 4: cartier_ transition_mod_p2). For degree closure, since deg Q = 2 and deg R ≤ 2p, whenever deg A ≤ 2 and deg B ≤ 4: deg AQ(p−1)/2 ≤ 2 + (p − 1) = p + 1 =⇒ deg A′ ≤ ⌊(p + 1)/p⌋ = 1 ≤ 2,
deg BQ(3p−3)/2 ≤ 4 + 3p − 3 = 3p + 1,
deg ARQ(p−1)/2 ≤ 2 + 2p + p − 1 = 3p + 1,
so deg B ′ ≤ ⌊(3p + 1)/p⌋ = 3 ≤ 4 for every p ≥ 3 (Lean 4: cartier_degree_closure and cartierStep_deg_closure). Since Q(0) = 1, [x0 ]FA,B (x) = A(0) + pB(0). Finally, strong induction on m = n + 2 ≥ 2 via least-significant-first base-p division proves that any finite inductive invariant avoiding A(0) + pB(0) ≡ 0 (mod p2 ) on cls = ge2 implies p2 ∤ Mn (1, c) for all n ≥ 0 (Lean 4: cartier_certificate_sound). (b) For p = 3, all 6 unit classes c̃ ∈ {1, 2, 4, 5, 7, 8} (mod 9) satisfy 9 | Mn (1, c̃) at minimal indices n = 4, 7, 14, 4, 13, 2 respectively, while 3 | b yields 9 | M50 (b, c) by Theorem 2.1(c) at r = 3, and 3 | c, 3 ∤ b satisfies 3 ∤ Mn (b, c) by Theorem 2.1(a); this entire if-and-only-if classification is formalized in Lean 4 (witness_p3_all6_nonavoiding, not_div_9_iff). 10
Table 1: Complete p2 -avoidance classification over unit projective classes c̃ = cb−2 ∈ (Z/p2 Z)× for p ∈ {3, 5, 7}, with exact reachable state counts (untagged (A, B) states) and worst-case minimal witnesses among non-avoiding unit classes. p Units
Avoiding c̃ mod p2
Reachable states
3 5 7
∅ {1, 18, 23} {5, 12, 19, 25}
— (Lean 4: not_div_9_iff) 6/6 (c̃ = 4, nmin = 14) 632, 577, 577 17/20 (c̃ = 6, nmin = 224) 1231, 1327, 1327, 2122 38/42 (c̃ = 20, nmin = 832)
6 20 42
Refuted (worst (c̃, nmin ))
For p ∈ {5, 7} and each avoiding unit class (c ∈ {1, 18, 23} (mod 25); c ∈ {5, 12, 19, 25} (mod 49)), exact integer breadth-first search under (18) generates the complete reachable tagged state set (A, B, cls) and exports it verbatim to data/cartier_certificates.json (Section 5). A structurally independent raw-convolution auditor (audit_cartier_certificate_ independent, sharing none of the BFS generator’s linear-table or polynomial-power helpers) recomputes Q(x)p and R(x) from scratch over Z, verifies lift independence under c 7→ c + p2 , and checks all three hypotheses of cartier_certificate_sound directly on every exported state and every digit 0 ≤ r < p, supplemented by live recurrence cross-checks over all 0 ≤ n ≤ 500. Combining the audited certificates with the Lean 4 soundness theorem establishes p2 ∤ Mn (1, c) for all n ≥ 0 (note that while the algebraic reduction and certificate soundness are formalized in Lean 4, the finite state-set verification for p ∈ {5, 7} is computer-certified in exact integer Python). Every remaining unit class (17 for p = 5, 38 for p = 7) is refuted elementarily by an explicit minimal integer n with p2 | Mn (1, c) (Table 1 and data/verification_report.json). Remark 4.2 (Link to minimal mod-p zero density). Every nontrivial p2 -avoiding class in Theo2 rem 4.1(b) projects modulo p into the minimal mod-p zero-density locus δp (1, c) = p(p−1) (cf. [4]): for p = 5, {1, 18, 23} mod 5 = {1, 3} (where δ5 = 1/10); for p = 7, {5, 12, 19, 25} mod 7 = {4, 5} (where δ7 = 1/21). Conversely, membership in the minimal-density mod-p locus is necessary among p ∈ {3, 5, 7} but not sufficient: at p = 3, c̃ ≡ 2 (mod 3) achieves δ3 = 1/3, yet all three lifts 2, 5, 8 (mod 9) hit 9 | Mn at n = 7, 4, 2, respectively.
Formal Verification, Computational Tables, and Empirical 2k Telemetry
Showing searchable text extract (31,706 characters of 8,458 total words). Open or download the canonical PDF above for the complete typeset manuscript and equations.
References (9)
- (1979) “Ensembles presque périodiques $k$-reconnaissables” Theoretical Computer Science, 9, 141–145 [DOI]
- (2006) “Congruences for Catalan and Motzkin numbers and related sequences” Journal of Number Theory, 117, 191–215 [DOI]
- (2008) “Catalan and Motzkin numbers modulo $4$ and $8$” European Journal of Combinatorics, 29, 1449–1466 [DOI]
- (2024) “Density and symmetry in the generalized Motzkin numbers mod $p$” [arXiv:2411.03681]
- (2018) “Motzkin numbers and related sequences modulo powers of $2$” European Journal of Combinatorics, 73, 114–137 [DOI]
- (1852) “Über die Ergänzungssätze zu den allgemeinen Reciprocitätsgesetzen” Journal für die reine und angewandte Mathematik, 44, 93–146 [DOI]
- (2015) “Automatic congruences for diagonals of rational functions” Journal de Théorie des Nombres de Bordeaux, 27, 245–288 [DOI]
- (2014) “Congruences involving generalized central trinomial coefficients” Science China Mathematics, 57, 1375–1400 [DOI]
- (2018) “A classification of Motzkin numbers modulo $8$” Electronic Journal of Combinatorics, 25, \#P1.54 [DOI]
Cite this paper
Lluis Eriksson (2026). Parity-Splitting Duality, Self-Contained Mod-8 Tetrachotomy, Kummer Unboundedness for p | b, and Cartier-Automaton Classification of p^2-Avoiding Generalized Motzkin Numbers for p in {3, 5, 7}. AIRR.SCIENCE, ARR-2026-50P2CD4BBB8BHB29, v2. https://airr.science/papers/ARR-2026-50P2CD4BBB8BHB29/versions/v2/
Use the DOI (when listed) or permanent version link to cite the exact manuscript you read. A DOI is a persistent citation identifier, not journal peer review. A Working paper label means the version has not completed AIRR screening. Import BibTeX, RIS or CSL JSON into your reference manager to apply a citation style.
Version history
The paper identifier remains stable. Each version has its own immutable release, timestamp and version identifier.
Revision statement
Major revision. Upgrades ARR-2026-50P2CD4BBB8BHB29 v1 to a standalone, zero-import, universally quantified Lean 4.36.0 mechanization (lean/OV83_GeneralizedMotzkin.lean, 29/29 audited public theorems, 0 sorry, 0 warnings under -DwarningAsError=true, 0 custom axioms) paired with an exact-Z/Q stdlib-only Python verifier (src/verify_ov83_motzkin.py, pytest -W error).
Verification record
- Frontier-model screening
- Pass · 2 models
- Source integrity
- Pass
- Bibliographic integrity
- Pass
- Reproducibility
- Pass
- Lean 4
- L2
Recorded under ARR-VERIFY-1.0. AIRR verification and screening are not peer review.
More in Mathematics
Unimodular Möbius Factorization, Exact Prime-Power vs. Composite F_q-Rank Dichotomy, Lucas Parity Jumps, and Real-Corank Laws for Mod-m Boolean Set-Intersection Matrices EXCELLENT
Exact Real-Rootedness, Jacobi Staircase Duality, and Krawchouk Phase Transitions for Signed-Averaged Immanant Matching Polynomials VERY GOOD
Exact Entropic Ricci Curvature of Non-Abelian Fourier Multipliers: Amenable Bezout Cocycle Rigidity, Universal Coxeter Wall-Hypercube Curvature, Rank-2 Plane Additivity, and the Kleinian SU(2)-SO(3) Dichotomy EXCELLENT
Non-Abelian Sidon Sets in Finite Groups: Involution Obstructions, Generalized Dihedral Collapse, Dicyclic Separation, and Complete Classification of Strict Product-Sidon-Trivial Groups EXCELLENT
Uniform All-N (forall N >= 11) Infinite-Family Zero-Seed Mass Gap Theorem for Four-Dimensional D_4 SU(N) Heat-Kernel Yang-Mills via Vertex-Star W_v16 Cancellation and One-Sided H_rem Jensen Tilt STRONG
Curvature-Tight Submodular Dual Certificates, Degree-Centered Spectral Max-Cut Pencils, Row AM/GM Sinkhorn Bounds, and Cumulative Haemers Enclosures ACCEPTABLE
AI assistance statement
Authored by Lluis Eriksson with AI-assisted Lean 4.36.0 mechanization, exact-Z/Q verifier engineering, and LaTeX drafting (Google Antigravity). Evaluated independently in fresh isolated blind sessions by Google DeepMind/gemini-4-hydrogen (6.00/10 accept) and Google DeepMind/gemini-4-neon (6.00/10 accept) under ARR-ASSESS-1.0 with zero unresolved material objections.
Frontier-model screening
Status: pass. Any listed reports correspond to this exact version under ARR-ASSESS-1.0; no absent assessment is represented as a pass.
- gemini-4-hydrogenGoogle DeepMind · pass
- gemini-4-neonGoogle DeepMind · pass
Model assessments and review context
- Distinct models
- 2
- Range
- 6.00–6.00
- Method
- bounded capability-weighted mean · exact version only
Limited evidence · 0/2 benchmark matches. This is an evidence description, not a probability of correctness.
One provider; shared blind spots possible; Benchmark match incomplete
Google DeepMind · gemini-4-neon · High · not involved in manuscript · review context: fresh blind6.00
Recommendation: Accept · Material objections: 0
Version 2 of ARR-2026-50P2CD4BBB8BHB29 classifies prime-power avoidance for the two-parameter generalized Motzkin numbers M_n(b, c) across all (b, c) in Z^2 for p = 2 (modulo 4 and 8) and p in {3, 5, 7} (modulo p^2), alongside a universal prime-p projective collapse and zero-borrow Kummer unboundedness theorem for p | b. Independent verification on OVH Limburgo confirmed 18/18 MANIFEST.sha256 hashes, exact compilation of the 6,064-line zero-import Lean 4.36.0 file under -DwarningAsError=true with zero sorry and zero custom axioms (exact diff match to data/lean_axioms_audit.txt across all 29 headline theorems), bit-for-bit reproduction of verification_report.json and cartier_certificates.json by the zero-float Python suite (6/6 pytest -W error tests passing), and an independent convolution-recurrence check of all 61 non-avoiding minimal witnesses and 7 avoiding classes. All claims in paper.tex/paper.pdf align 1:1 with the formal and computational artifacts, and the v2 trust boundaries (Lean-proved analytic theorems and mod-4/8/9 classifications vs. independently audited exact-integer Cartier certificates for p in {5, 7}, plus clearly labeled empirical 2^k telemetry) are cleanly calibrated.
- Correctness confidence
- All 29 headline Lean 4.36.0 theorems compile cleanly (-DwarningAsError=true, 0 sorry, 0 custom axioms, exact diff match to lean_axioms_audit.txt), proving Theorems 2.1, 3.1, 4.1(a), Cor. 3.2, and p=3 of Thm. 4.1(b). All 7 avoiding p in {5,7} Cartier certificates pass independent raw-convolution audit, and an independent convolution check verified all 61 non-avoiding minimal witnesses.
- Rigor
- Zero-import 6,064-line Lean formalization directly on motzkin b c n, eliminating external reliance on Eu-Liu-Yeh (2008) for 8 not dividing M_n(1,1) and proving Cartier lift independence and certificate soundness. The p in {5,7} state-set checks remain in exact zero-float Python rather than the Lean kernel, but this trust boundary is transparently disclosed and backed by an AST-verified independent auditor.
- Novelty
- Extends single-point classical Motzkin results to the full (b,c) plane with a universal p|b zero-borrow Kummer bound, parity-splitting mod-8 master equations and c -> 3c duality yielding a self-contained mod-8 tetrachotomy, and lift-independent degree-(2,4) Cartier closure identifying 2 new 25-avoiding and 4 new 49-avoiding infinite families. Odd-prime machinery adapts Rowland-Yassawi (2015).
- Significance
- Provides a complete, machine-verified prime-power avoidance classification for generalized Motzkin numbers modulo 4, 8, 9, 25, and 49 and universal p|b unboundedness, resolving natural 2-parameter questions extending Eu-Liu-Yeh, Rowland-Yassawi, and Kohen. Impact is strongest within arithmetic combinatorics and formal math, while odd-prime classification remains limited to p <= 7.
- Reproducibility
- All 18 MANIFEST.sha256 entries pass sha256sum -c, paper.pdf matches canonical_sha256 (616,497 bytes, 14 pages), Lean 4.36.0 compiles with 0 warnings and exact axiom audit match, pure-stdlib zero-float Python (AST 0/0/0) reproduces verification_report.json (cb397914a9238662) and cartier_certificates.json (80ccc99fd39c93e0) identically, and 6/6 pytest -W error tests pass in <1s.
Strengths
- Complete, zero-import standalone Lean 4.36.0 formalization (6,064 lines, 29 headline theorems directly on motzkin b c n) compiling cleanly with -DwarningAsError=true, zero sorry, zero native_decide, and only standard axioms [propext, Classical.choice, Quot.sound].
- Fully self-contained algebraic proof of 8 not dividing M_n(1,1) via iterated parity splitting of the master mod-8 equation, eliminating external citation dependence on Eu-Liu-Yeh (2008) and yielding a complete mod-4 and mod-8 if-and-only-if classification over all (b, c) in Z^2.
- Clean universal prime-p zero-borrow Kummer proof establishing v_p(M_{2(p^r - 2)}(b, c)) >= r - 1 (and >= r for p >= 5) whenever p | b, formalized end-to-end in Lean 4.
- Lift-independent degree-(2, 4) Cartier module reduction over Z/p^2Z[[x]] with formal soundness theorem (cartier_certificate_sound) and externally exported state-set certificates for all 7 avoiding classes at p in {5, 7}, verified by an AST-checked structurally independent raw-convolution auditor with negative tamper-rejection tests.
- Exemplary claim calibration and reproducibility: honest separation of Lean-checked vs. Python-certified results, explicit empirical labeling for Table 3 and Figure 1(a), exact 1:1 fidelity across paper.tex, paper.pdf, Lean theorems, and JSON reports.
Weaknesses
- The finite Cartier state-set checks for the 7 avoiding classes at p in {5, 7} (632 to 2,122 states) are verified in exact zero-float Python rather than inside the Lean 4 kernel, leaving a small (though transparently documented and independently audited) verification boundary compared to the p in {2, 3} classifications.
- Odd-prime p^2-avoidance classification stops at p in {3, 5, 7} without a general analytic criterion predicting the avoiding classes or explaining why all observed classes project onto Kohen's minimal mod-p zero-density locus.
- Minor non-mathematical polish items: header comments in lean/OV83_GeneralizedMotzkin.lean and src/verify_ov83_motzkin.py still read 'Exact Mod-8 Tetrachotomy' instead of the v2 title 'Self-Contained Mod-8 Tetrachotomy'; Lean's cartierStep_deg_closure proves DegLe <= 2 and <= 4 (sufficient for closure) while Theorem 4.1(a) notes the tighter intermediate bounds deg A' <= 1 <= 2 and deg B' <= 3 <= 4; and Figure 1(a)'s caption rounds 4/3 = 1.333... to 1.33.
Potential errors
None reported.
Strong novelty candidates
- Universal zero-borrow Kummer unboundedness bound v_p(M_{2(p^r - 2)}(b, c)) >= r - 1 (and >= r for p >= 5) for all primes p >= 2 whenever p | b (Theorem 2.1(c)).
- Parity-splitting master mod-8 equations, exact c -> 3c even/odd duality, c -> c + 4 parity-flip shift, self-contained iterated parity-split proof of 8 not dividing M_n(1, 1), and complete mod-4/mod-8 tetrachotomy over all (b, c) in Z^2 (Theorem 3.1, Corollary 3.2).
- Complete Z/p^2Z Cartier classification for p in {3, 5, 7}, identifying two new 25-avoiding infinite families (c_tilde in {18, 23} mod 25) and four new 49-avoiding infinite families (c_tilde in {5, 12, 19, 25} mod 49) backed by formal certificate soundness and externally exported invariant sets (Theorem 4.1).
Unresolved material objections
None reported.
arr:assessment:07c125aa-76c0-48cc-9ccf-dae2494d55b2 · prompt ARR-ASSESS-1.0 · runtime identity: Google DeepMind gemini-4-neon · reasoning effort: high · basis: platform runtime metadata · evidence SHA-256 5f220c49d979a0f4be6d0f024ebb61d61e8e193f1e08c985f3fc617387d3cc8b · response SHA-256 fa53306c73648eb6f7bc2fb6ba32cf78e7a8bcc70c1cd04fbb5fcc83c2577b40 · canonical PDF SHA-256 e88b8783e72817a953957644292915e3d10e86262aa1c87b2c4033af12dfc5fe
Google DeepMind · gemini-4-hydrogen · High · not involved in manuscript · review context: fresh blind6.00
Recommendation: Accept · Material objections: 0
Version 2 of ARR-2026-50P2CD4BBB8BHB29 classifies prime-power avoidance for the generalized Motzkin numbers M_n(b, c) across the entire parameter plane (b, c) in Z^2 modulo 4 and 8 (p = 2) and modulo p^2 for p in {3, 5, 7}, while proving projective collapse and zero-borrow Kummer unboundedness whenever p | b for every prime p >= 2. Independent verification on OVH Limburgo confirmed 18/18 SHA-256 manifest matches, clean standalone zero-import Lean 4.36.0 compilation (-DwarningAsError=true, 0 sorry, standard axioms only across all 29 headline theorems), 1:1 fidelity between paper.tex/paper.pdf and Lean theorem statements on motzkin b c n, exact reproduction of data/verification_report.json and data/cartier_certificates.json by the AST-0/0/0 zero-float Python verifier, and 6/6 passing tests under pytest -W error including negative tamper rejection on the structurally independent Cartier certificate auditor.
- Correctness confidence
- All 29 headline theorems in lean/OV83_GeneralizedMotzkin.lean compile cleanly in standalone Lean 4.36.0 (-DwarningAsError=true, 0 sorry, standard axioms only matching data/lean_axioms_audit.txt). Python exact-Z verification and all 6/6 pytest -W error tests pass, and all 7 exported Cartier certificates pass the AST-verified independent raw-convolution auditor.
- Rigor
- All analytic results (Thms. 2.1, 3.1, 4.1(a), Cor. 3.2) and the mod-4, mod-8, and mod-9 classifications are proved directly on the recurrence motzkin b c n without external citations or sorry. Lift independence of R(x) mod p and Cartier certificate soundness are formally proved, and the Python verifier is AST-checked for zero floats.
- Novelty
- Extends prime-power avoidance from (1, 1) to the full (b, c) plane via a general p | b zero-borrow Kummer bound, parity-splitting master mod-8 equations with exact c -> 3c duality and c -> c+4 shift, a self-contained proof of 8 not dividing M_n(1, 1), and six new 25- and 49-avoiding infinite families.
- Significance
- Completely classifies 4-, 8-, and p^2-avoidance for p in {3, 5, 7} across Z^2, links p^2-avoidance to the minimal mod-p zero-density locus, and formulates crisp open problems on unboundedness for c = 5, 7 (mod 8), general primes p > 7, and p^3-avoidance.
- Reproducibility
- All 18 files match MANIFEST.sha256. Standalone Lean 4.36.0 compilation, axiom audit diff, pure-stdlib zero-float Python verification (REPORT_SHA256_16=cb397914a9238662, CERTS_SHA256_16=80ccc99fd39c93e0), and 6/6 pytest -W error tests (including 4 negative tamper tests) reproduced identically on OVH Limburgo.
Strengths
- Self-contained standalone zero-import Lean 4.36.0 formalization (6064 lines, 29 headline theorems directly on the recurrence motzkin b c n) compiling under -DwarningAsError=true with zero sorry and only standard axioms [propext, Classical.choice, Quot.sound].
- Complete 1:1 fidelity between manuscript theorems (Eq. 1 equivalence, Thm. 2.1(a)-(d), Thm. 3.1(a)-(d), Cor. 3.2(a)-(b), Thm. 4.1(a), and p=3 Thm. 4.1(b)) and the formal Lean statements, including IsPrime and universal quantifiers over (b, c) in Z^2.
- Fully self-contained algebraic proof of 8 not dividing M_n(1, 1) and the full mod-8 tetrachotomy via iterated parity splitting, eliminating external citation dependence on Eu-Liu-Yeh (2008).
- Lift-independent degree-(2, 4) Z/p^2Z Cartier module closure and general certificate soundness theorem (cartier_certificate_sound) formalized in Lean 4, paired with externally exported state sets in data/cartier_certificates.json and a structurally independent raw-convolution auditor (verified via AST test and 4 negative tamper tests).
- Transparent epistemic calibration throughout v2: empirical 2^k counts in Table 3 and Figure 1(a) are explicitly labeled as finite-window telemetry, Kummer sharpness is qualified as tested, and the boundary between Lean-proved theorems and Python-certified p in {5, 7} state sets is stated clearly.
Weaknesses
- For p in {5, 7}, the finite state-set verification of the 7 avoiding unit classes (632, 577, 577 states at p=5; 1231, 1327, 1327, 2122 states at p=7) and the non-avoiding minimal witnesses (up to n_min = 224 and n_min = 832) are certified in exact integer Python rather than inside the Lean 4 kernel, unlike p = 3 (not_div_9_iff).
- Exact equality in the Kummer bound (v_p(M_{2(p^r-2)}(p, 1)) = r - 1 for p in {2, 3} and = r for p >= 5) is verified only for finite tested exponents and remains open in general.
- Classification of p^2-avoiding unit classes is carried out for p in {3, 5, 7}; asymptotic behavior for general primes p > 7, unboundedness of v_2 for c = 5, 7 (mod 8), and p^3-avoidance remain open.
Potential errors
None reported.
Strong novelty candidates
- Universal zero-borrow Kummer unboundedness bound v_p(M_{2(p^r-2)}(b, c)) >= r - 1 (and >= r for p >= 5) for all primes p >= 2 whenever p | b (Theorem 2.1(c)).
- Master mod-8 parity-splitting equations, exact c -> 3c even/odd duality, c -> c+4 parity-flip shift, and self-contained algebraic proof of the mod-8 tetrachotomy and 4-/8-avoidance classification across (b, c) in Z^2 (Theorem 3.1, Corollary 3.2).
- Explicit lift-independent degree-(2, 4) Z/p^2Z Cartier module reduction and formal soundness theorem (Theorem 4.1(a)), discovering two new 25-avoiding families ({18, 23} mod 25) and four new 49-avoiding families ({5, 12, 19, 25} mod 49) alongside complete refutation of 9-avoidance (0/6 unit classes).
Unresolved material objections
None reported.
arr:assessment:d065f6d0-6f16-4122-8b25-a40fd77e75c7 · prompt ARR-ASSESS-1.0 · runtime identity: Google DeepMind gemini-4-hydrogen · reasoning effort: high · basis: platform runtime metadata · evidence SHA-256 fe512d66ac75cdb9ce843d5a263116efd5096c596efb615ef48a931db9284f3f · response SHA-256 ab0c340bf0c3e8a30a2ac328eb705cfd4961d77864df8129f5515adec692f288 · canonical PDF SHA-256 e88b8783e72817a953957644292915e3d10e86262aa1c87b2c4033af12dfc5fe
A model assessment is not peer review or a correctness certificate. AIRR preserves disagreement, exact-version provenance and later reassessments.
Editorial disclosure
Published as major extended v2 superseding v1 following unanimous acceptance in two independent fresh blind frontier-model evaluations (Google DeepMind/gemini-4-hydrogen 6.00/10 and Google DeepMind/gemini-4-neon 6.00/10; mean 6.00/10) with zero unresolved material objections and verified Lean 4.36.0 + exact-Z/Q Python artifacts archived directly in this AIRR record.