Quadratic periods after adjoining one move to a fixed subtraction game
Yuwen Pan
math.CO
Nov 23, 2026 · v1
TL;DR
Formalizes in Lean 4 the complete classification of periods and preperiods for subtraction game {3,6,17} plus one move, and Theorem 11.
Abstract
Zhang conjectured that adjoining one move $c$ to a fixed subtraction set $S$ gives a Grundy sequence whose least preperiod and period are both $O_S(c)$. For every $q=20+9s$ with $s\ge0$, take $S=\{3,6,q-3\}$. Along $c=qk+1$ with $k\ge2$, the Grundy and win/loss sequences are periodic from heap zero with common least period $(k+2)(c+6)-11$, asymptotic to $c^2/q$. For $\{3,6,17\}$ we determine both least periods and preperiods for every positive $c$ and verify the complete table in Lean. Fixed bases with the same entire Grundy sequence realize infinitely many distinct positive quadratic coefficients for the augmented period. A second fixed triple gives a quadratic Grundy preperiod while the win/loss sequence repeats from heap zero. A third has a quadratic Grundy period but only a linear win/loss period. For an arbitrary fixed $S$, a linear bound on both Grundy invariants implies eventual affine formulas with integer coefficients on residue classes. The same finite-state method extends four numerical tables of Zhang. We also give the entire augmented sequence for $c>\max S$ when the losing heaps of $S$ are exactly the multiples of a fixed integer.
Problem
Zhang conjectured that adjoining one move c to a fixed subtraction set S yields Grundy sequences whose least preperiod and period are O_S(c) and eventually affine in c on residue classes. A related question asked the same for win/loss sequences.
Approach
Explicit period words are constructed from finite blocks arranged in rows of width c+6. The mex equations are verified via reduction lemmas to finitely many instances, and once-per-cycle binary markers establish minimality of the period. A finite-state column-transition argument handles arbitrary bases under linear bounds. The full classification for base {3,6,17} and the arithmetic-progression-of-losing-heaps result are formalized in Lean.
Results
For S={3,6,q-3} with q=20+9s and c=qk+1, both sequences have least period (k+2)(c+6)-11 c^2/q, disproving both conjectures and answering Zhang's Remark 2 negatively. A complete table of periods and preperiods for {3,6,17}∪{c} is verified in Lean. Further results: bases with quadratic Grundy preperiod or quadratic Grundy but linear outcome period, linear bounds forcing affine formulas, and an exact formula when losing heaps are multiples of q.
| r | ℓ_g | ℓ_w | p |
|---|
| 0,8,9,18,19 | 0 | 0 | c+3 |
| 1 | 0 | 0 | (k+2)(c+6)-11 |
| 2 | c+1 | c-5 | c+26 |
| 3–6,14–17 | 0 | 0 | 20 |
| 12 | 8 | 2 | (k+3)(c+6)-2 |
Least onsets and common least period for {3,6,17}∪{c}, c=20k+r (generic classes, excerpt)