\documentclass[11pt,a4paper]{article} \usepackage[top=23mm,bottom=22mm,left=27mm,right=27mm]{geometry} \usepackage{amsmath,amssymb,amsthm,booktabs,xcolor} \usepackage[labelsep=period]{caption} \usepackage{hyperref} \definecolor{inkblue}{RGB}{22,63,82} \definecolor{rust}{RGB}{141,60,30} \hypersetup{colorlinks=true,linkcolor=inkblue,citecolor=inkblue,urlcolor=inkblue, pdftitle={The largest sets avoiding four-term arithmetic progressions modulo 101}, pdfauthor={Igor Silva},pdfsubject={Finite extremal combinatorics}} \urlstyle{same} \newtheorem{theorem}{Theorem} \newtheorem{lemma}{Lemma} \newtheorem{corollary}{Corollary} \newcommand{\F}{\mathbb F_{101}} \newcommand{\Aff}{\operatorname{Aff}(\F)} \newcommand{\card}[1]{\lvert #1\rvert} \newcommand{\code}[1]{\texttt{#1}} \newcommand{\J}{J} \newcommand{\W}{W} \setlength{\parindent}{1.2em} \setlength{\parskip}{2pt} \setlength{\abovedisplayskip}{7pt plus 2pt} \setlength{\belowdisplayskip}{7pt plus 2pt} \raggedbottom \begin{document} \begin{center} {\LARGE\bfseries The largest sets avoiding four-term\\[3pt] arithmetic progressions modulo 101\par} \vspace{10pt} {\large Igor Silva\par} \vspace{3pt} {\small Working manuscript, 1 December 2026\par} \end{center} \begin{abstract} We determine the maximum size of a subset of \(\F\) containing no four-term arithmetic progression with nonzero common difference. The maximum is 31. There are exactly 16 extremizers up to invertible affine transformations, giving 161,600 labelled sets. The proof reduces the search by an affine second-moment argument and certifies the remaining cases with branching trees and finite colorings. A separate C++ reader checked all the trees. The classification also measures how far a nearly largest set can be from an extremizer. A previously published 30-point set has a unique closest extremizer, retaining just 21 points. We give its nine deletions and ten insertions, and a Lean proof of the overlap and uniqueness within the catalogue. \end{abstract} \section{The finite problem} Call \(A\subseteq\F\) \emph{free} if it contains no four points \(a,a+d,a+2d,a+3d\) with \(d\ne0\). All arithmetic in this definition is modulo 101. Write \(\alpha_4(101)\) for the maximum size of a free set. The maps \(x\mapsto ux+v\), \(u\ne0\), preserve freeness. We regard two sets as equivalent when one is the image of the other under such a map. \begin{theorem}[Computer-assisted classification]\label{th:main} \(\alpha_4(101)=31\). Every free 31-set is affinely equivalent to exactly one of the sixteen sets \(R_0,\ldots,R_{15}\) in Table~\ref{tab:models}. Each has trivial affine stabilizer. There are exactly \(16\cdot100\cdot101=161{,}600\) free 31-sets on the labelled field. \end{theorem} One extremizer has the following ordinary representatives in \([0,75]\). \begin{align*} R_0=\{&0,1,2,7,8,10,13,14,15,17,18,24,25,27,29,32,\\[-2pt] &38,42,44,45,46,49,51,53,54,56,67,69,71,72,75\}. \end{align*} This set also gives the integer-interval construction at the end of the paper. Halbeisen and Halbeisen studied the analogous extremal number for cyclic groups, computed small cases and gave a smaller example of a maximal free set below the maximum \cite{halbeisen}. Walker searched for four-term-free digit sets modulo primes through 37 \cite{walker}. Liber obtained bounds for cyclic progression hypergraphs when the modulus is a multiple of the progression length \cite{liber}. In July 2026, TheoremDB posed the exact question for \(\F\) and recorded the bounds \(30\leq\alpha_4(101)\leq67\), together with a 30-point example \cite{theoremdb}. We found no earlier exact value or classification for these parameters in the sources we checked. Our computation grew out of the Left to Solve investigation of Erd\H{o}s problem 142. That problem asks for an asymptotic formula on integer intervals \cite{erdos}. A finite consequence for intervals is given in Corollary~\ref{cor:digits}. \newpage \section{Reducing the search to intersections with a subgroup} Let \(Q\) be the 50 nonzero squares of \(\F\), let \(N=2Q\), and let \(H=\langle16\rangle\) be the subgroup of order 25. Indeed, 2 generates \(\F^\times\), as \(2^{20}=95\) and \(2^{50}=-1\) modulo 101. Thus \(Q=H\sqcup4H\) and \(N=\F^\times\setminus Q\). We use \(Q\) to force a dense part of the set, then \(H\) to specify the search roots. \begin{lemma}\label{lem:normal} Every 31-point subset of \(\F\) has an affine image \(B\) for which \(\card{B\cap Q}\ge18\) and \(\card{B\cap H}\ge9\). The image can be chosen so that its word \[ w(B)=\sum_{j=0}^{24}2^j\,\mathbf{1}_{B}(16^j) \] is the least integer among its 25 cyclic bit rotations. \end{lemma} \begin{proof} Fix a 31-set \(A\). For \(g\in\Aff\), put \(X_g=\card{A\cap gQ}\) and \(Y_g=\card{A\cap gN}\). Summing over the \(10{,}100\) maps gives \[ \sum_g X_g=\sum_g Y_g=100\cdot50\cdot31,\qquad \sum_g X_gY_g=50^2\cdot31\cdot30 . \] For the first identity there are 100 maps taking a specified point to another specified point. For the second, each ordered pair in \(Q\times N\) has distinct entries and admits exactly one affine map to each ordered pair of distinct points of \(A\). Consequently \[ \sum_g(17-X_g)(17-Y_g) =10{,}100\cdot17^2-2\cdot17\cdot100\cdot50\cdot31 +50^2\cdot31\cdot30=-26{,}100 . \] Some \(X_g\) or \(Y_g\) is at least 18. Since \(N=2Q\), passing to an inverse affine image gives a set with at least 18 points in \(Q\). At least nine lie in one of \(H\) and \(4H\). Multiplication by \(4^{-1}\) if necessary brings that coset to \(H\) while preserving \(Q\). Finally, multiplication by a power of 16 rotates the word and preserves both intersection sizes. \end{proof} \paragraph{Root enumeration.} The first decision in the search fixes \(B\cap H\) exactly. Keep the 25-bit integers with at least nine set bits that are least in their rotation class. Discard a word if its selected points already contain a progression. To implement the latter test, generate the masks of \(\{a,a+d,a+2d,a+3d\}\subseteq H\) from field arithmetic. There are 50 distinct four-element masks. In exponent coordinates they are precisely the cyclic rotations of \(\{0,6,10,11\}\) and \(\{0,2,9,12\}\). A word is discarded exactly when it contains one of them. Of the \(2^{25}\) words, 143,926 meet all three requirements, including 46,185 of weight nine. For fixed \(w\), the points in \(H\) with bit one are forced in and the other points in \(H\) are forced out. Lemma~\ref{lem:normal} puts an affine image of every free 31-set under at least one of these roots. \begin{center}\small \begin{tabular}{@{}lrrrrrrr@{}} \toprule Weight & 9 & 10 & 11 & 12 & 13 & 14 & 15\\ Admissible roots & 46,185 & 47,907 & 33,134 & 13,644 & 2,818 & 232 & 6\\ \bottomrule \end{tabular} \end{center} No larger weight occurs. As a separate check, the supplement enumerates labelled free subsets of \(H\) by adding exponents in increasing order. It then applies Burnside's lemma. Among the 24 nonidentity rotations, four fix the words of period dividing five and twenty fix only constant words. Testing the 32 five-bit patterns gives the same table. \newpage \section{Certificates for the remaining cases} At a node write \(I\) for the points forced in and \(E\) for those forced out. An internal node chooses \(x\notin I\cup E\). Its two children put \(x\) in \(I\) and in \(E\), respectively. A compatible completion \(C\) satisfies \(I\subseteq C\) and \(C\cap E=\varnothing\). \paragraph{Bound leaves.} The certificate names a scope \(S\), either \(Q\) or \(\F\), and a set \(P\subseteq S\setminus E\). For every \(x\in S\setminus(E\cup P)\) the reader checks that \(x\) completes a progression with three distinct points of \(I\) different from \(x\). Thus every free completion has \(C\cap S\subseteq P\). The reader then checks a coloring of \(P\). For any two distinct sites of one color, it requires a progression containing those sites and two other points of \(I\). A free completion therefore takes at most one point of each color. A leaf using at most 17 colors on \(Q\), or 30 on \(\F\), rules out a normalized free 31-set. For the pair test the reader tabulates, for each \(\{x,y\}\), every pair \(\{s,t\}\) completing it to a progression. Enumerating all starts and steps \(1,\ldots,50\) gives 5,050 distinct progression sets. Every pair of sites belongs to six of them, by affine transitivity and double counting. Thus each pair tested in a color class has just six possible completions to examine. \paragraph{Model leaves.} The third type records \(I\) itself. The reader requires it to equal one of the 161,600 distinct affine images generated from Table~\ref{tab:models}. For every image it checks its size, freeness, and that each site outside it completes a progression. Hence \(I\) is its only free completion. \begin{center} \small \begin{tabular}{@{}lr@{}} \toprule Terminal certificate & Number of leaves\\ \midrule At most 17 points on the nonzero squares & 707,173,826\\ At most 30 points on the field & 1,733,114,387\\ Explicit placement of a catalogue set & 868\\ \midrule Total & 2,440,289,081\\ \bottomrule \end{tabular} \end{center} \begin{proof}[Proof of Theorem~\ref{th:main}] We use the checked computation archived in \cite{archive}. The independent reader regenerates the required root set for each residue \(w\bmod1021\). It checks exact coverage, both children at each split, and the condition at every leaf. Across the 1,021 parts, 564 distinct words yield the 868 explicit placements. Induction from the leaves shows that every normalized free 31-set belongs to the catalogue. Lemma~\ref{lem:normal} and affine invariance give the same conclusion for every free 31-set. A larger free set would contain one of these 31-sets, contradicting its verified maximality. Each listed set is free, so the maximum is attained. All \(16\cdot10{,}100\) generated images are distinct. This proves both inequivalence and the stabilizer assertion. \end{proof} Two earlier C++ enumerations in the archive used a different normalization based on pairs symmetric about a common centre \cite{enumerations}. Both gave the same 16 classes. In the second enumeration all 147 slices agreed with the predicted multiset of 1,222 rooted witnesses. \newpage \section{The catalogue and two near-maximum sets} A hexadecimal integer \(h\) encodes the set of positions of its one bits. Bit zero denotes \(0\in\F\). Table~\ref{tab:models} also gives the greatest overlap of each affine class with the following two free 30-sets. The first is the witness from TheoremDB \cite{theoremdb}. The second fits in the 66 consecutive positions \(0,\ldots,65\) \cite{archive}. \begin{align*} \J=\{&0,10,18,23,27,29,35,37,39,40,45,47,48,49,56,\\[-2pt] &61,65,68,69,70,72,76,78,79,84,85,87,91,93,95\},\\[2pt] \W=\{&0,1,2,5,6,7,9,10,12,16,21,22,24,29,30,\\[-2pt] &31,33,34,37,38,47,48,49,51,55,57,61,62,63,65\}. \end{align*} \begin{table}[h] \centering\small \begin{tabular}{@{}rlrr@{}} \toprule \(j\) & Hexadecimal mask of \(R_j\) & \(\displaystyle\max_g\card{\J\cap gR_j}\) & \(\displaystyle\max_g\card{\W\cap gR_j}\)\\ \midrule 0&\code{9a8016a74412b06e587}&17&19\\ 1&\code{9a801ca74412b06e587}&18&19\\ 2&\code{a2a4760ed08266c2343}&20&21\\ 3&\code{42c59c6802a716e014d1}&19&20\\ 4&\code{42c59c6c00a716e014d1}&18&19\\ 5&\code{42c59c6c02a616e014d1}&19&19\\ 6&\code{704502906416e24e41b7}&19&20\\ 7&\code{826a0368c5016629c347}&19&20\\ 8&\code{826a0768c50166294347}&19&20\\ 9&\code{8a6a036845016629c347}&19&19\\ 10&\code{8a6a0368e5012621c347}&18&19\\ 11&\code{a0056e150152e285c517}&20&20\\ 12&\code{d8396a210b12e1116047}&\textbf{21}&19\\ 13&\code{125619091b44c3448ac45}&19&18\\ 14&\code{15941d220803972e41703}&19&\textbf{24}\\ 15&\code{15941d220813b60e41703}&18&22\\ \bottomrule \end{tabular} \caption{One representative from each affine class of extremizers. The maxima range over the 10,100 invertible affine maps.}\label{tab:models} \end{table} \begin{theorem}\label{th:nearest} The greatest intersection of \(\J\) with an extremizer has size 21, attained only by \(67R_{12}+95\). For \(\W\) the greatest intersection has size 24, attained only by \(97R_{14}+48\). Thus the least possible numbers of deletions and insertions are respectively \((9,10)\) for \(\J\) and \((6,7)\) for \(\W\). In each case one extremizer attains both minima. \end{theorem} \newpage \begin{proof}[Proof of Theorem~\ref{th:nearest}] For \(A\in\{\J,\W\}\), fix \(j\) and \(u\ne0\). Each pair \((x,y)\in A\times R_j\) contributes one count to the unique shift \(v=x-uy\). Since multiplication by \(u\) is injective, the count at \(v\) is exactly \(\card{A\cap(uR_j+v)}\). Computing these 101 counts for each \((j,u)\) gives Table~\ref{tab:models}. The last two columns attain their overall maxima only at the two triples stated in the theorem. The accompanying Lean proof checks these maxima and the uniqueness of each attaining triple against the sixteen masks. It sums 31 rotated copies of the input bit mask, one per element of \(uR_j\), in five binary planes. At position \(v\) the resulting integer is the intersection count. Checking its threshold in all 101 positions simultaneously leaves exactly one attaining shift in each maximizing class. Theorem~\ref{th:main} supplies completeness of the catalogue. If \(B\) is any extremizer, the deletion and insertion counts are \(30-\card{A\cap B}\) and \(31-\card{A\cap B}\). \end{proof} For the July witness, the nearest extremizer \(B=67R_{12}+95\) satisfies \begin{align*} \J\setminus B&=\{0,29,37,45,49,65,68,78,91\},\\ B\setminus\J&=\{5,7,8,14,21,36,41,51,57,83\}. \end{align*} Deleting the first line and then inserting the second gives a route through free sets. The deletion phase stays inside \(\J\), and the insertion phase stays inside \(B\). \begin{figure}[h] \centering \newcommand{\plotmarks}[2]{\def\doitem##1{\put(##1,#1){#2}}% \csname @for\endcsname\pos:=\marklist\do{\expandafter\doitem\expandafter{\pos}}} \setlength{\unitlength}{0.0085\linewidth} \begin{picture}(116,23)(-13,-8)% \linethickness{0.25pt}% \put(0,0){\line(1,0){100}}% \multiput(0,-0.5)(10,0){11}{\line(0,1){1}}% \def\marklist{0,20,40,60,80,100}% \plotmarks{-1.4}{\makebox(0,0)[t]{\scriptsize\pos}}% \put(-2,10){\makebox(0,0)[r]{\small \(\J\)}}% \put(-2,4.0){\makebox(0,0)[r]{\small \(B\)}}% \color{black!65}% \def\marklist{10,18,23,27,35,39,40,47,48,56,61,69,70,72,76,79,84,85,87,93,95}% \plotmarks{10}{\circle*{0.9}}% \plotmarks{4}{\circle*{0.9}}% \color{rust}% \def\marklist{0,29,37,45,49,65,68,78,91}% \plotmarks{10}{\circle{1.45}}% \color{inkblue}% \def\marklist{5,7,8,14,21,36,41,51,57,83}% \plotmarks{4}{\makebox(0,0){\rule{1.1mm}{1.1mm}}}% \end{picture} \caption{The July witness \(\J\) and its closest extremizer \(B=67R_{12}+95\), with residues shown on a common axis. Filled circles are the 21 retained points. Open circles are the nine deletions and squares the ten insertions.} \label{fig:edits} \end{figure} In particular, both 30-sets are inclusion-maximal on the whole circle. Adjoining a single point would give an extremizer meeting the original set in all 30 points. \begin{corollary}\label{cor:digits} Let \(r_4(n)\) be the maximum size of a subset of \(\{0,\ldots,n-1\}\) avoiding four-term integer progressions of positive step. For \(n\ge1\), \[ r_4\bigl(101(n-1)+76\bigr)\ \ge\ 31r_4(n). \] \end{corollary} \begin{proof} The largest occupied position of \(R_0\) is 75. If \(X\) attains \(r_4(n)\), the \(31\card{X}\) integers \(101x+y\), \(x\in X,\ y\in R_0\), lie in the claimed interval. A progression whose step is nonzero modulo 101 would give a progression in \(R_0\). A positive step divisible by 101 would keep the digit \(y\) constant and give a progression in \(X\). \end{proof} \newpage \section{Reproducing the calculations} The public archive \cite{archive} pins the source of the tree producer, the separately implemented reader, the sixteen representatives and the SHA-256 digest of every partition. The transient tree files total 278,195,689,828 bytes. They can be regenerated and checked one partition at a time, with the largest tree file occupying 403,571,799 bytes. The following commands run from the archive directory with Python 3 and a C++17 compiler supporting unsigned 128-bit integers. \begin{verbatim} python3 check_audit.py python3 check_reader_controls.py python3 forest/classify_parts.py --parts 1021 --part 13 --jobs 1 \end{verbatim} The first command reconstructs the root bitmap and the affine placements, then reconciles them with all 1,021 receipts. The second regenerates one 19,705-leaf tree and tests rejection of a corrupted model and missing roots. The third regenerates a full partition. In checking this manuscript we matched its original digest across 185 roots and 3,244,027 leaves. For a complete replay use a fresh archive checkout, omit \code{--part 13}, and then run \begin{verbatim} python3 check_audit.py --receipts forest/results-1021-a05e260be9623986 \end{verbatim} \paragraph{Formal verification.} The archive contains Lean proofs of normalization, validity and inequivalence of the representatives, and the implication from a complete register of accepted trees to Theorem~\ref{th:main}. The full register was checked in C++. A complete replay of that register in the Lean kernel remains open. For Theorem~\ref{th:nearest} the supplement supplies \code{NearestOptima101.lean} for Lean 4.33.1 with pinned Mathlib. It proves both exact overlaps and uniqueness within the catalogue. \code{ArchiveBridge.lean} identifies the catalogues pointwise and states the resulting conditional global theorem. The Python scripts \code{root\_census.py} and \code{verify\_tables.py} reproduce the root counts, Table~\ref{tab:models}, and the two sets of edits. \paragraph{Contributions.} Igor Silva initiated the investigation during the Left to Solve marathon. OpenAI Codex was used in developing the arguments, implementing the searches and verifiers, running computations, and drafting the manuscript. The previously published set \(\J\) is credited to the TheoremDB record. \begin{thebibliography}{9}\small\raggedright\setlength{\itemsep}{1pt} \bibitem{halbeisen} L. Halbeisen and S. Halbeisen. \href{https://doi.org/10.4171/EM/16}{Avoiding arithmetic progressions in cyclic groups}. \emph{Elemente der Mathematik} \textbf{60} (2005), 114--123. \bibitem{walker} A. Walker. \href{https://awwalker.com/2020/02/14/fractal-sets-and-arithmetic-progressions/}{Fractal Sets and Arithmetic Progressions}. Research note, 14 February 2020. \bibitem{liber} B. Liber. \href{https://arxiv.org/abs/2509.07926}{On the Independence Numbers of the Cyclic Van der Waerden Hypergraphs}. arXiv:2509.07926 (2025). \bibitem{theoremdb} TheoremDB. \href{https://theoremdb.org/statements/P2622/}{Largest four-term-progression-free subset of \(\mathbb Z_{101}\)}. Statement P2622 and witness, 25 July 2026. \bibitem{erdos} T. Bloom (ed.). \href{https://www.erdosproblems.com/142}{Erd\H{o}s problem 142}. Erd\H{o}s Problems. \bibitem{archive} I. Silva, with OpenAI Codex. \href{https://github.com/igor9silva/open-math-agents/tree/524fdd4985a2a55780e5ed8056382166126d19b3/research/erdos142/cyclic101-final-certificates}{Four-term arithmetic progressions modulo 101}. Certificate archive, revision \code{524fdd4985a2}, 30 November 2026. \bibitem{enumerations} I. Silva, with OpenAI Codex. \href{https://github.com/igor9silva/open-math-agents/tree/524fdd4985a2a55780e5ed8056382166126d19b3/research/erdos142/independent-31-enumerations}{Two completed enumerations of the optimal sets modulo 101}. Programs and search records, 2026. \end{thebibliography} \end{document}