\documentclass[preprint,12pt]{elsarticle} \usepackage{amssymb} \usepackage{amsmath} \usepackage{amsthm} \usepackage[utf8]{inputenc} \usepackage{lmodern} \usepackage{graphicx} \usepackage{xurl} \usepackage[hidelinks]{hyperref} \hypersetup{pdfauthor={Deep Bhattacharjee, Ushashi Bhattacharya}} \journal{Discrete Mathematics} \newcommand{\zenodoID}{10.5281/zenodo.23455972} \newcommand{\preprintURL}{https://github.com/creelie/didactic-lamp/blob/main/preprintGurvichNaumovaConjecture/GurvichNaumovaConjecture.pdf} \newtheorem{theorem}{Theorem}[section] \newtheorem{proposition}[theorem]{Proposition} \newtheorem{lemma}[theorem]{Lemma} \newtheorem{corollary}[theorem]{Corollary} \newtheorem{conjecture}[theorem]{Conjecture} \theoremstyle{definition} \newtheorem{definition}[theorem]{Definition} \newtheorem{remark}[theorem]{Remark} \newtheorem{example}[theorem]{Example} \newcommand{\Z}{\mathbb{Z}} \newcommand{\iv}[2]{[#1,#2]} \begin{document} \begin{frontmatter} \title{Partitioning \texorpdfstring{$\{1,\dots,n\}$}{\{1,...,n\}} into parts of size at most three whose sums are powers of three} \author[egspl,ucal]{Deep Bhattacharjee\corref{cor1}\fnref{orcid1}} \ead{itsdeep@live.com} \ead{d.bhattacharjee@erl-forschung.de} \fntext[orcid1]{ORCID: \url{https://orcid.org/0000-0003-0466-750X}} \cortext[cor1]{Corresponding author.} \affiliation[egspl]{organization={Formerly, Electro-Gravitational Space Propulsion Laboratory (EGSPL)}, city={Bhubaneswar}, postcode={751030}, state={Odisha}, country={India}} \affiliation[ucal]{organization={Formerly, University of Calcutta}, addressline={Senate House, 87/1 College Street}, city={Kolkata}, postcode={700073}, state={West Bengal}, country={India}} \author[ntu]{Ushashi Bhattacharya\fnref{orcid2}} \ead{rai.bhattacharya.in@gmail.com} \fntext[orcid2]{ORCID: \url{https://orcid.org/0009-0002-2254-3914}} \affiliation[ntu]{organization={Formerly, National Taiwan University}, city={Taipei}, postcode={106319}, country={Taiwan}} \begin{abstract} We prove unconditionally the conjecture of Gurvich and Naumova that for every $n\ge1$ the set $\{1,\dots,n\}$ can be partitioned into parts of at most three elements whose sums are powers of $3$. The partition is given by an explicit recursion. \end{abstract} \begin{keyword} set partition \sep powers of three \sep zero-sum triples \sep formal verification \MSC[2020] Primary 05A18 \sep Secondary 11B75 \sep 68V15 \end{keyword} \end{frontmatter} \section{Introduction}\label{sec:intro} Let $m\ge2$ and $n\ge1$ be integers and $[n]=\{1,\dots,n\}$. Gurvich and Naumova \cite{GN} call a partition of $[n]$ \emph{$m$-good} if every part has at most $m$ elements and the sum of the elements of every part is a power $m^k$, $k\ge0$, of $m$. Every $[n]$ has exactly one $2$-good partition \cite[Proposition~1]{GN}. In an $m$-good partition every part other than $\{1\}$ has sum $\equiv0\pmod m$, so $n(n+1)/2\equiv0$ or $1\pmod m$. For $n=2(m^t+1)$ this sum is $\equiv3\pmod m$; hence for $m\ge4$ the set $[n]$ has no $m$-good partition \cite[Observation~1]{GN}.\footnote{Partitions of an interval into small parts tied by an additive condition go back to Skolem \cite{Sko57}, who proved that $\{1,\dots,2n\}$ is a disjoint union of pairs $\{a_i,b_i\}$ with $b_i-a_i=i$, $1\le i\le n$, if and only if $n\equiv0$ or $1\pmod4$. Such pairs give a partition of $\{1,\dots,3n\}$ into the $n$ triples $\{i,\,n+a_i,\,n+b_i\}$, each of the form $\{x,y,x+y\}$: the first entries run over $\{1,\dots,n\}$, the other two over $\{n+1,\dots,3n\}$, and $i+(n+a_i)=n+b_i$. In the problem of Gurvich and Naumova the condition is on the sum of a part rather than on a difference.} For $m=3$ they stated: \begin{conjecture}[{\cite[Conjecture~1]{GN}}]\label{conj:gn} For every $n\ge1$ the set $[n]$ has a $3$-good partition. \end{conjecture} They proved that a minimal counterexample is of the form $n=3^t+3k+2$ with $0\le k<(3^{t-1}-1)/2$ and $k\ne(3^\ell-1)/2$ for $0\le\ell3T$, and for $n=T+j$ with $j\not\equiv2\pmod 3$, the reductions of \cite[Section~2]{GN} pass from $[n]$ to a shorter interval. For the remaining $n=T+j$, $j\equiv2\pmod3$, $2jb$. For $Z\subset\Z$ and $c,s\in\Z$ write $c+sZ=\{c+sz:z\in Z\}$ and $c-Z=\{c-z:z\in Z\}$. A finite set $A\subset\Z$ is \emph{admissible} if $|A|\le3$ and $\sum_{x\in A}x=3^k$ for some $k\ge0$. A finite set $S\subset\Z$ is \emph{good} if it is a disjoint union of admissible sets;\footnote{A partition of $S$ is a cover of $S$ in which every point lies in exactly one set. Covers in which every point lies in at least $k$ of the sets, and the nerve complexes that record how the sets of a cover meet, are studied in~\cite{BB26}.} thus $[n]$ is good if and only if it has a $3$-good partition. A finite set $Z\subset\Z$ is \emph{balanced} if it is a disjoint union of sets each of which is $\{0\}$ or a $3$-element set with sum $0$. Disjoint unions of good sets are good, and disjoint unions of balanced sets are balanced. \begin{lemma}[{\cite[Lemma~1]{GN}}]\label{lem:interval} If $\ell\ge0$ and $\ell\not\equiv2\pmod3$, then $\iv{-\ell}{\ell}$ is balanced. \end{lemma} \begin{proof} Write $\ell=3k+r$ with $r\in\{0,1\}$. For $0\le iT$, and $3jT$, then $u=t-1$. As $T$ and $3j$ are multiples of $3$, $T\le3j-3$, so $T-2j+1\in\iv2{j-2}\subseteq D$. For $d\in\iv1{j-2}$ we have $T-d\ge T-j+2>j-2$, so $T-d\in D$ only if $T-d=2j-1$. Hence \[ F=\iv1{j-2}\setminus\{T-2j+1\}=[j]\setminus W_j, \] because $3^{u+1}=T$ and $W_j=\{j-1,j,T-2j+1\}$. The number $j=3^u+(j-3^u)$ satisfies \eqref{eq:range} at level $u$, so $F$ is good by $H(j)$. If $3j3^{u+2}-3^{u+1}>2j-1$. Hence $F=D$. Put $p=3^{u+1}-2j+1$; then $2\le p\le j-2$, because $2j+1\le 3^{u+1}$ and $j\ge3^u+1$. Since $W_j=\{j-1,j,p\}$, \[ F=D=\bigl([j]\setminus W_j\bigr)\cup\{p,\,2j-1\}, \] a disjoint union of a set that is good by $H(j)$ and a pair with sum $3^{u+1}$. \emph{Case $3j3^{u+1}$.} Let $P=3^{u+1}$. As before $T\ge3P$, so $T=3P$ or $T\ge9P$; and $P+1\le2j\le2P-2$. Write $P=2c+1$ and put \[ N=j-c,\qquad e=P-1-j=c-N. \] Then $N\ge1$, $e\ge0$, $j=e+2N$, and $2N-2=2j-P-1\le P-3$. Since $3\mid P$ we have $c\equiv1\pmod3$, hence $N\equiv1$ and $e\equiv0\pmod 3$. Let $\sigma$, $\Pi$, $\Delta_N$ be as in Lemma~\ref{lem:sigma}, $K=2N-2$, and \[ D=\iv1e\cup(P+\Delta_N). \] By Lemma~\ref{lem:sigma}(iii), $P+\Delta_N\subseteq\iv{P-2N+2}{P+2N-2}=\iv{2e+3}{2j-1}$, so the union is disjoint, $D\subseteq\iv1{2P-3}\subseteq\iv1{T-1}$, and $2j-1=P+(2N-2)\in D$. We show $F=D$. Let $d,d'\in D$ with $d+d'=T$. If $d\le e$, then $d+d'\le e+2P-3<3P\le T$; so $d=P+\delta$ and $d'=P+\delta'$ with $\delta,\delta'\in\Delta_N$ and $\delta+\delta'=T-2P$. If $T\ge9P$, then $\delta+\delta'\ge7P>2(P-3)$, which is impossible. If $T=3P$, then $\delta+\delta'=P$ is odd. Since $\delta,\delta'\le P-3$, both are positive, hence even by Lemma~\ref{lem:sigma}(iii), a contradiction. Thus $F=D$, which is good: $\iv1e=[e]$ is good by hypothesis, and $P+\Delta_N$ by Lemmas~\ref{lem:sigma} and~\ref{lem:image}. It remains to compute $R$. First, $\iv{T+1}{T+j}\setminus W=T+\iv1{j-2}=T+\iv1{e+K}$. Second, $T-D=T+\iv{-e}{-1}$ together with $T-P-\Delta_N$; here $T-P-(2N-2)=T-2j+1\in W$, and for $z\in\Pi$, using $P-2N-1=2e$, \[ T-P-\bigl(z+\sigma(z)-(2N+1)\bigr)=T-\bigl(2e+z+\sigma(z)\bigr). \] By Lemma~\ref{lem:sigma}(ii) these numbers differ from $T-2j+1$. Hence $R=T+Z$ with \[ Z=\iv{-e}{e}\ \cup\bigcup_{z\in\Pi}\bigl\{e+z,\ e+\sigma(z),\ -(2e+z+\sigma(z))\bigr\}. \] Each set $\{e+z,e+\sigma(z),-(2e+z+\sigma(z))\}$ has three elements and sum $0$. As $z$ runs over $\Pi$, the numbers $e+z$ and $e+\sigma(z)$ run over $e+\iv1K$ once each, because $\sigma$ is a fixed-point-free involution; the numbers $-(2e+z+\sigma(z))$ are distinct by Lemma~\ref{lem:sigma}(i) and less than $-e$. Since $\iv{-e}{e}$ is balanced by Lemma~\ref{lem:interval}, $Z$ is balanced, and $R$ is good by Lemma~\ref{lem:image}. \end{proof} \begin{proof}[Proof of Theorem~\ref{thm:main}] We prove by strong induction on $n\ge0$ that $[n]$ is good and that $H(n)$ holds whenever it is defined; $[0]=\emptyset$. The sets $[1]=\{1\}$ and $[2]=\{1,2\}$ are admissible, and $H(1)$, $H(2)$ are not defined. Let $n\ge3$, $T=3^t\le n<3T$, $t\ge1$. Whenever $H(n)$ is defined, it holds by Proposition~\ref{prop:H} and the induction hypothesis. For $[n]$ there are four cases. \begin{enumerate} \item[(a)] $n=T$: $[n]=[T-1]\cup\{T\}$. \item[(b)] $2n\ge3T+1$: with $a=3T-1-n9$, so the last case applies with $P=9$, $c=4$, $N=4$, $e=0$. The involution $\sigma$ of $\iv16$ is $1\leftrightarrow4$, $2\leftrightarrow5$, $3\leftrightarrow6$, $\Delta_4=\{6,-4,-2,0\}$ and $D=\{5,7,9,15\}$. The construction gives the $3$-good partition of $[35]$ into \[ \{5,7,15\},\ \{9\},\ \{27\},\ \{18,30,33\},\ \{20,29,32\},\ \{22,28,31\},\ \{12,34,35\} \] and the nine pairs $\{x,27-x\}$, $x\in\{1,2,3,4,6,8,10,11,13\}$; see Figure~\ref{fig:example}. \end{example} \begin{figure}[t] \centering \includegraphics[width=\textwidth]{figures/fig_example.png} \caption{The $3$-good partition of $[35]$ given by the recursion. Each triple is drawn as two arcs above the line, each pair as one arc below it.}\label{fig:example} \end{figure} The recursion computes the partition of $[n]$ in $O(n)$ arithmetic operations. \section{Formal verification}\label{sec:lean} Theorem~\ref{thm:main} is formalized in Lean~4 \cite{MU21} with Mathlib \cite{Mathlib20}, version~4.34.1, and the formal proof is checked by the Lean kernel. The formal statement says that for every natural number $n$ there is a partition of $\{1,\dots,n\}$ into nonempty parts, each of which has at most three elements and a power of $3$ as its sum. In the formal proof, good and balanced sets are the finite sets of integers built by disjoint union from the admissible sets, respectively from $\{0\}$ and the $3$-element sets with sum $0$, and the argument is that of Sections~\ref{sec:prelim}--\ref{sec:proof}. The proof depends only on the axioms of Lean's logic, namely propositional extensionality, choice and the soundness of quotients; it has no unproved step and adds no axiom. Independent computations in exact integer arithmetic run the recursion of Section~\ref{sec:proof} and confirm that it gives a $3$-good partition of $[n]$ for every $n\le30000$ and for further values of $n$ up to $6.5\cdot10^7$, and that $H(n)$ holds for every $n$ in these ranges for which it is defined. They also confirm Lemma~\ref{lem:interval} for $\ell\le30000$ and Lemma~\ref{lem:sigma} for $N\le30001$. \section*{Data and code availability} \begingroup\raggedright The \LaTeX{} source of the paper, the Lean~4 formalization of Theorem~\ref{thm:main} and the programs of Section~\ref{sec:lean} are archived at Zenodo under doi:\href{https://doi.org/\zenodoID}{\zenodoID} \cite{archive}; the paper is available at \url{\preprintURL}. Deep Bhattacharjee carried out the computations and the Lean, Julia, C, C\texttt{++}, Python and shell verifications, and the proofs and the text were drafted, with AI assistance (Claude, Anthropic); both authors approved the final version.\par \endgroup \section*{Ethical declarations} Funding: none. Competing interests: none. \begin{thebibliography}{9} \raggedright \expandafter\ifx\csname url\endcsname\relax \def\url#1{\texttt{#1}}\fi \expandafter\ifx\csname urlprefix\endcsname\relax\def\urlprefix{URL }\fi \expandafter\ifx\csname href\endcsname\relax \def\href#1#2{#2} \def\path#1{#1}\fi \bibitem{GN} V.~Gurvich, M.~Naumova, Partitioning set $[n]=\{1,\dots,n\}$ into subsets of size at most $m$ such that all sums are powers of $m$, arXiv:2508.00946 [math.CO] (2025). \newblock \href {https://doi.org/10.48550/arXiv.2508.00946} {\path{doi:10.48550/arXiv.2508.00946}}. \bibitem{Sko57} Th.~Skolem, On certain distributions of integers in pairs with given differences, Math. Scand. 5 (1957) 57--68. \newblock \href {https://doi.org/10.7146/math.scand.a-10490} {\path{doi:10.7146/math.scand.a-10490}}. \bibitem{MU21} L.~de~Moura, S.~Ullrich, The {L}ean 4 theorem prover and programming language, in: Automated Deduction -- CADE 28, Vol. 12699 of Lecture Notes in Comput. Sci., Springer, Cham, 2021, pp. 625--635. \newblock \href {https://doi.org/10.1007/978-3-030-79876-5_37} {\path{doi:10.1007/978-3-030-79876-5_37}}. \bibitem{Mathlib20} {The mathlib Community}, The {L}ean mathematical library, in: Proceedings of the 9th ACM SIGPLAN International Conference on Certified Programs and Proofs, ACM, New York, 2020, pp. 367--381. \newblock \href {https://doi.org/10.1145/3372885.3373824} {\path{doi:10.1145/3372885.3373824}}. \bibitem{BB26} D.~Bhattacharjee, U.~Bhattacharya, Iterated nerve complexes for $k$-fold sensor coverage, Preprints.org (2026). \newblock \href {https://doi.org/10.20944/preprints202606.1351.v2} {\path{doi:10.20944/preprints202606.1351.v2}}. \bibitem{Bha22} D.~Bhattacharjee, Establishing equivariant class $[O]$ for hyperbolic groups, Asian Res. J. Math. 18~(11) (2022) 362--369. \newblock \href {https://doi.org/10.9734/arjom/2022/v18i11615} {\path{doi:10.9734/arjom/2022/v18i11615}}. \bibitem{BN26} D.~Bhattacharjee, P.~Nandi, Enriques and {K}ummer surfaces arising from {K3} involutions, Preprints.org (2026). \newblock \href {https://doi.org/10.20944/preprints202602.0098.v1} {\path{doi:10.20944/preprints202602.0098.v1}}. \bibitem{archive} D.~Bhattacharjee, U.~Bhattacharya, Partitioning $\{1,\dots,n\}$ into parts of size at most three whose sums are powers of three: paper, Lean 4 formalization and verification code, Zenodo (2026). \newblock \href {https://doi.org/10.5281/zenodo.23455972} {\path{doi:10.5281/zenodo.23455972}}. \end{thebibliography} \end{document}