\documentclass[11pt]{amsart} \usepackage[margin=1.15in]{geometry} \usepackage{amssymb,amsmath,amsthm} \usepackage{booktabs} \usepackage{xcolor} \usepackage[colorlinks=true,linkcolor=blue!50!black,citecolor=blue!50!black,urlcolor=blue!50!black]{hyperref} \newtheorem{theorem}{Theorem} \newtheorem{lemma}[theorem]{Lemma} \newtheorem{proposition}[theorem]{Proposition} \newtheorem{corollary}[theorem]{Corollary} \theoremstyle{definition} \newtheorem{definition}[theorem]{Definition} \newtheorem{example}[theorem]{Example} \newtheorem{question}[theorem]{Question} \newtheorem{conjecture}[theorem]{Conjecture} \theoremstyle{remark} \newtheorem{remark}[theorem]{Remark} \newcommand{\Z}{\mathbb{Z}} \newcommand{\N}{\mathbb{N}} \newcommand{\Q}{\mathbb{Q}} \newcommand{\C}{\mathbb{C}} \newcommand{\abs}[1]{\left|#1\right|} \newcommand{\floor}[1]{\left\lfloor #1\right\rfloor} \newcommand{\Dig}{\mathcal{D}} \title{Splitting stones and binary expansions in complex bases} \author{Alon Amit} \author{Claude Opus 5.5} \date{Draft, November 2026} \begin{document} \begin{abstract} Place $n$ stones at position $0$ of the line. Sweeping left to right, at each position $i$ holding $m$ stones send $\floor{m/2}$ of them to $i+a$ and another $\floor{m/2}$ to $i+b$, leaving a single stone behind when $m$ is odd. For coprime $a1$; and the number $f(n)$ of singletons satisfies an effective Stewart-type lower bound $f(n)>\log\log n/(\log\log\log n+C)$ for every coprime pair except $(1,2)$ and $(2,3)$, for which $f$ equals $1$ infinitely often. For $(1,3)$ we determine all $n$ with $f(n)\le3$, using the Ramanujan--Nagell theorem. This work was inspired by the mathematics behind a problem found at Project Euler. \end{abstract} \maketitle \section{Introduction} Fix integers $1\le a1$, stones only occupy multiples of $d$, and the process is the $(a/d,b/d)$-process with positions scaled by $d$; its eventual windows then have period $d$ rather than $1$ (for $(a,b)=(2,4)$ and $n=4$ they alternate between $(2,0,1,0)$ and $(0,2,0,1)$). We assume $\gcd(a,b)=1$ from now on. The rest of the paper derives consequences. \begin{theorem}[Termination]\label{thm:term} The set of $n$ for which the $(a,b)$-process terminates is a finite initial segment $\{1,2,\dots,N(a,b)\}$, and $N(a,b)\equiv3\pmod4$. Moreover $N(1,2)=3$ and $N(1,3)=N(2,3)=7$. \end{theorem} \begin{theorem}[Size of the largest singleton]\label{thm:g} Let $\mu=\mu_{a,b}>1$ be the smallest absolute value of a root of $P_{a,b}$. Then $g(n)=\log_\mu n+O(1)$. For $(a,b)=(1,3)$, where $\mu=\sqrt2$, \[ 2\log_2 n-3.55\frac{\log\log n}{\log\log\log n+C}. \] For $(a,b)=(1,3)$ one may take $C=32$, for all $n\ge3$. \item[(b)] For $(1,2)$ and $(2,3)$ we have $f(4^k)=1$ and $f(16^k)=1$, respectively, for all $k\ge0$. \end{enumerate} In particular $f_{a,b}(n)\to\infty$ if and only if $(a,b)\notin\{(1,2),(2,3)\}$. \end{theorem} The proof of (a) follows Stewart's method for digits in two integer bases \cite{Stewart}, with the two complex-conjugate roots of $P$ playing the role of the two bases, and uses Matveev's lower bound for linear forms in logarithms \cite{Matveev}. A key input is that no two roots of $P_{a,b}$ have a root-of-unity ratio unless $(a,b)=(2,3)$ (Proposition~\ref{prop:rou}). The bound is of theoretical interest only: for $(1,3)$ it gives $f(n)\ge3$ only when $\log\log n>72$, while the numerical evidence of Section~\ref{sec:data} suggests that in fact $f(n)\gg\log n$ (Conjecture~\ref{conj:log}). For small values we can say much more: \begin{proposition}\label{prop:small} For $(a,b)=(1,3)$: $f(n)=1$ if and only if $n=1$; $f(n)=2$ if and only if $n\in\{2,90\}$; $f(n)=3$ if and only if $n\in\{3,91\}$. \end{proposition} The value $90=\alpha+\alpha^{13}$ comes from the solution $2^{15}=181^2+7$ of the Ramanujan--Nagell equation. On average, $f(n)$ is about half the number of digits; see Section~\ref{sec:data}. \subsection*{Related work} Digit systems of this type, called \emph{canonical number systems}, have a large literature, starting with Knuth's and Penney's complex bases \cite{Knuth,Penney} and the classification of quadratic bases by K\'atai--Kov\'acs and Gilbert \cite{KK1,KK2,Gilbert}. The coefficients of $P_{a,b}$ satisfy $1\le p_{b-2}\le\dots\le p_1\le p_0$ and $p_0\ge2$, which is Kov\'acs' classical sufficient condition for a canonical number system \cite{Kovacs,AP}; we will not use this. The estimate $g(n)=\log_\mu n+O(1)$ is a special case of the length estimates of Kov\'acs and Peth\H{o} \cite{KP}; see also \cite[Lemma~2.1]{DGT}. Length and sum-of-digits functions for complex bases were studied by Grabner, Kirschenhofer and Prodinger \cite{GKP} and, for rational integers in algebraic bases, by Dumont, Grabner and Thomas \cite{DGT}. For a pair of multiplicatively independent canonical bases of an imaginary quadratic field, Sharma \cite{Sharma} proved a Stewart-type lower bound for the total number of nonzero digits; applied to the bases $\alpha,\bar\alpha$ it gives Theorem~\ref{thm:f}(a) for $(1,3)$ with an extra factor $\tfrac12$ and an unspecified constant. Chip-firing on the line with a different firing rule (send $a$ chips left and $b$ chips right) leads to the rational bases $b/a$ of Propp and Tanton \cite{Borodin}. The identification of the singletons with base-$\alpha$ digits in the case $(1,3)$ may be known informally; we have not found the general splitting process, Theorem~\ref{thm:main} in this generality, or the results of Sections~\ref{sec:term}--\ref{sec:effective} in the literature. \subsection*{AI disclosure} This paper was written by Claude Opus 5.5, an AI model developed by Anthropic, following questions and guidance from the first author. The first author (A.A.) has read the paper, understands its arguments, and vouches for its results. \section{The number field and binary expansions} Throughout, $1\le a1$. Moreover $P$ is separable and irreducible over $\Q$. \end{lemma} \begin{proof} The roots of $P$ are the roots of $x^a+x^b=2$ other than $x=1$ (which is a simple root of $x^a+x^b-2$, as the derivative there is $a+b\neq0$). If $\abs{z}\le1$ and $z^a+z^b=2$ then $\abs{z^a}=\abs{z^b}=1$ and $z^a=z^b=1$, so $z^{\gcd(a,b)}=z=1$. Hence $\abs\beta>1$. For separability, suppose $z$ is a multiple root of $x^a+x^b-2$. Then $az^{a-1}+bz^{b-1}=0$, so $z^{b-a}=-a/b$ and $\abs{z}<1$, contradicting the first part (note $z\ne1$). For irreducibility, suppose $P=QQ'$ with $Q,Q'\in\Z[x]$ monic of positive degree. Then $\abs{Q(0)}$ and $\abs{Q'(0)}$ are products of absolute values of roots of $P$, hence integers greater than $1$; but $\abs{Q(0)Q'(0)}=P(0)=2$. \end{proof} \begin{lemma}\label{lem:ring} \begin{enumerate} \item $\Z[\beta]\cong\Z[x]/(P)$ and $\Z[\beta]/\beta\Z[\beta]\cong\Z/2\Z$; in particular $\beta\Z[\beta]\cap\Z=2\Z$. Moreover $\beta\mathcal O_K$ is a prime ideal of norm $2$, and $\beta\mathcal O_K\cap\Z[\beta]=\beta\Z[\beta]$. \item (Uniqueness) If $\sum_{s\in A}\beta^s=\sum_{s\in B}\beta^s$ for finite sets $A,B\subset\Z_{\ge0}$, then $A=B$. \end{enumerate} \end{lemma} \begin{proof} (1) $P$ is the minimal polynomial of $\beta$ (Lemma~\ref{lem:roots}), so $\Z[\beta]\cong\Z[x]/(P)$ and $\Z[\beta]/\beta\Z[\beta]\cong\Z[x]/(x,P)\cong\Z/P(0)\Z=\Z/2\Z$. Also $\abs{N_{K/\Q}(\beta)}=\abs{P(0)}=2$, so $\beta\mathcal O_K$ has norm $2$ and is a prime ideal with residue field $\mathbb F_2$. The natural map $\Z[\beta]/\beta\Z[\beta]\to\mathcal O_K/\beta\mathcal O_K$ sends $1$ to $1$, so it is an isomorphism of fields with two elements, and its kernel $(\beta\mathcal O_K\cap\Z[\beta])/\beta\Z[\beta]$ is trivial. (2) Suppose $A\ne B$ and let $s_0=\min(A\triangle B)$. Removing common elements below $s_0$ and dividing by $\beta^{s_0}$, we get $1+\beta y=\beta z$ with $y,z\in\Z[\beta]$, i.e.\ $1\in\beta\Z[\beta]$, contradicting (1). \end{proof} For a nonzero $\psi\in\Z[\beta]$ define its \emph{digit} $d(\psi)\in\{0,1\}$ as the unique $d$ with $\psi\equiv d\pmod{\beta\Z[\beta]}$, and the \emph{digit map} $T(\psi)=(\psi-d(\psi))/\beta\in\Z[\beta]$. The base-$\beta$ expansion of $\psi$ is finite precisely when iterating $T$ reaches $0$, in which case the digits read off along the way form the unique (by Lemma~\ref{lem:ring}(2)) set $\Dig(\psi)$ with $\psi=\sum_{s\in\Dig(\psi)}\beta^s$. \begin{remark}[The order $\Z{[\beta]}$ and the maximal order $\mathcal O_K$]\label{rem:mono} Nothing in this paper requires $\Z[\beta]$ to be the full ring of integers: expansions in base $\beta$ live in $\Z[\beta]$ by definition, and Lemma~\ref{lem:ring}(1) shows that $\beta$ behaves the same way in $\Z[\beta]$ and in $\mathcal O_K$, while norms, prime ideals and heights are computed in $K$ and $\mathcal O_K$. For $(a,b)=(1,3)$, where $\beta$ can be taken to be $\alpha=(-1+\sqrt{-7})/2$, $\Z[\beta]=\mathcal O_K$. A computation of integral bases shows that among coprime pairs with $b<50$, $\Z[\beta]\ne\mathcal O_K$ for exactly the following $15$ pairs, where we also list the primes dividing the index $[\mathcal O_K:\Z[\beta]]$ (confirmed by Dedekind's criterion): \begin{center} \begin{tabular}{@{}r@{\,}l@{\quad}l@{\qquad}c@{\qquad}r@{\,}l@{\quad}l@{\qquad}c@{\qquad}r@{\,}l@{\quad}l@{}} \toprule \multicolumn{2}{c}{$(a,b)$} & $p$ && \multicolumn{2}{c}{$(a,b)$} & $p$ && \multicolumn{2}{c}{$(a,b)$} & $p$\\ \midrule $(15,$&$16)$ & $11$ && $(5,$&$31)$ & $59$ && $(15,$&$38)$ & $11$\\ $(19,$&$20)$ & $17$ && $(27,$&$32)$ & $67$ && $(5,$&$42)$ & $11$\\ $(12,$&$25)$ & $11,17$ && $(25,$&$34)$ & $11$ && $(1,$&$44)$ & $17$\\ $(13,$&$28)$ & $17$ && $(8,$&$35)$ & $11$ && $(4,$&$45)$ & $11$\\ $(4,$&$31)$ & $17$ && $(7,$&$36)$ & $17$ && $(26,$&$45)$ & $11$\\ \bottomrule \end{tabular} \end{center} In particular $\Z[\beta]=\mathcal O_K$ for all coprime pairs with $b\le15$. When $\Z[\beta]=\mathcal O_K$, the base $\beta$ with digits $\{0,1\}$ is a canonical number system for the whole of $\mathcal O_K$ (by the coefficient criterion mentioned in the introduction); recall that Kov\'acs \cite{Kovacs} showed that the ring of integers of a number field of degree at least $3$ has a canonical number system exactly when it has a power integral basis. When $\Z[\beta]\ne\mathcal O_K$, as in the examples above, $\beta$ is not a canonical base for $\mathcal O_K$ (an element of $\mathcal O_K\setminus\Z[\beta]$ has no finite expansion), but $\mathcal O_K$ might still have a power integral basis generated by another element. Kov\'acs' theorem does not decide this, since it is an equivalence between two properties, not a statement that either holds. We do not know whether these rings are monogenic. The simplest obstruction does not apply: a common index divisor of $K$ would divide $[\mathcal O_K:\Z[\beta]]$, and for each of the $15$ pairs the primes listed above are unramified and split into few enough primes of each residue degree, so none of them is a common index divisor. \end{remark} \begin{question} For which coprime $(a,b)$ is $\Z[\beta]=\mathcal O_K$? \end{question} \begin{remark}[A heuristic for the primes $11$ and $17$]\label{rem:index} The predominance of $11$ and $17$ has the following explanation, which we have not made rigorous. Write $P=f/(x-1)$ with $f=x^b+x^a-2$. The trinomial discriminant formula gives $\operatorname{disc}(P)=\pm2^{a-1}E/(a+b)^2$ with $E=b^b(-2)^{b-a}-(-1)^b(b-a)^{b-a}a^a$, and in all our data an odd prime $p$ divides the index exactly when $p^2\mid\operatorname{disc}(P)$. For $p\nmid ab(b-a)$, $p\mid E$ means that $f$ has a double root modulo $p$, at a critical point $z$ with $z^{b-a}=-a/b$. Lifting $z$ to $\Z_p$ and expanding to the next order, $p^2\mid E$ becomes a linear condition on Fermat quotients $q(x)=(x^{p-1}-1)/p$, \[ b\,q(b)-a\,q(a)-(b-a)\,q(b-a)+(b-a)\,q(2)\equiv0\pmod p, \] which depends only on $t=a/b\bmod p$ and reads \[ H_p(t):=\frac{t^p+(1-t)^p-1}{p}-(1-t)\,q(2)\equiv0\pmod p . \] (With $x=-t$, the first term is the Cauchy polynomial $((1+x)^p-x^p-1)/p$ familiar from the history of Fermat's Last Theorem.) The roots $t=\pm1$ are always present and correspond to the excluded cases $p\mid b-a$ and $p\mid a+b$. So a prime can divide an index only if $H_p$ has a root in $\mathbb F_p\setminus\{0,\pm1\}$, and then it does so for a proportion of pairs of order $1/p^2$. Among $p<200$ such roots exist exactly for \[ p=11,17,31,37,59,61,67,73,79,83,97,103,107,127,139,157,167,179,191,193,199, \] and these are precisely the odd primes $p<200$ with $p^2\mid\operatorname{disc}(P_{a,b})$ for some coprime pair with $b<400$. The two smallest, $11$ and $17$, therefore dominate. The extra roots come in pairs $\{t,1/t\}$. \end{remark} \section{The process computes the expansion: proof of Theorem~\ref{thm:main}} Fix $n$. For $i\ge0$ let $c_j^{(i)}$ denote the number of stones at position $j$ just before the cursor processes position $i$. A stone sent from a position $jg$. Hence $w_0,\dots,w_{g+1}$ are pairwise distinct. This proves (b), and (c) follows: the process terminates iff $w_{g+1}=0$ iff $k=0$. \end{proof} \begin{remark} Theorem~\ref{thm:main}(b) says that a simulation detects the infinite loop exactly at step $g+2$, the first step at which a window repeats. In particular every cycle of the process has period $1$; for $(1,3)$ this can also be seen directly, as $(x,y,z)\mapsto(y+\floor{x/2},z,\floor{x/2})$ is linear on a cycle, with eigenvalues $1$ and $(-1\pm\sqrt{-7})/4$. \end{remark} \section{The length of the expansion: proof of Theorem~\ref{thm:g}} Let $\beta_1,\dots,\beta_{b-1}$ be the roots of $P$, distinct by Lemma~\ref{lem:roots}, and let $\sigma_k:K\to\C$ be the embedding with $\sigma_k(\beta)=\beta_k$. The map $\sigma=(\sigma_1,\dots,\sigma_{b-1}):K\to\C^{b-1}$ is injective and maps $\Z[\beta]$ onto a lattice, since in the basis $1,\beta,\dots,\beta^{b-2}$ it is given by an invertible Vandermonde matrix. Hence for every $B$ the set $F_B=\{\psi\in\Z[\beta]:\abs{\sigma_k(\psi)}\le B\ \forall k\}$ is finite. \emph{Upper bound.} From $\psi_{i+1}=(\psi_i-e_i)/\beta$ we get $\abs{\sigma_k(\psi_{i+1})}\le(\abs{\sigma_k(\psi_i)}+1)/\abs{\beta_k}$, hence by induction \[ \abs{\sigma_k(\psi_i)}\le n\abs{\beta_k}^{-i}+\frac{1}{\abs{\beta_k}-1}\le n\mu^{-i}+\frac1{\mu-1}. \] For $i_0=\lceil\log_\mu n\rceil$ we get $\psi_{i_0}\in F_B$ with $B=1+1/(\mu-1)$. Let $F'\subseteq F_B$ be the set of elements occurring as $\psi_{i_0}$ for some $n$. Each of them reaches $0$ under the digit map, by Theorem~\ref{thm:main} applied to that $n$, and $F'$ is finite, so all of them do so within some $M=M_{a,b}$ steps. So $g(n)+1\le\lceil\log_\mu n\rceil+M$. \emph{Lower bound.} Choose $k$ with $\abs{\beta_k}=\mu$ and apply $\sigma_k$ to $n=\sum_{s\in S(n)}\beta^s$: $n\le\sum_{s=0}^{g}\mu^s<\mu^{g+1}/(\mu-1)$. \emph{The case $(1,3)$.} Here $\sigma_1,\sigma_2$ are complex conjugate, so the single embedding $\alpha=(-1+\sqrt{-7})/2$ suffices, $\mu=\sqrt2$, and $B=1+1/(\sqrt2-1)=2+\sqrt2$. For $z=u+v\alpha$ we have $\abs z^2=u^2-uv+2v^2$, so $F_B$ consists of the $29$ pairs $(u,v)\in\Z^2$ with $u^2-uv+2v^2\le11$. In these coordinates the digit map is $(u,v)\mapsto(v-h,-h)$ with $h=\floor{u/2}$, and the numbers of elements of $F_B$ reaching $0$ after exactly $0,1,\dots,7$ steps are $1,1,2,4,7,6,6,2$. So $M=7$, and with $i_0=\lceil2\log_2n\rceil$ this gives $g(n)\le\lceil2\log_2 n\rceil+6$. The lower bound gives $2^{(g+1)/2}>(\sqrt2-1)n$, i.e.\ $g>2\log_2n-2\log_2(1+\sqrt2)-1>2\log_2 n-3.55$. \qed Numerically, for $1\le n\le 2^{20}$ the quantity $g(n)-2\log_2 n$ has minimum $-1.0945\ldots$ (at $n=11971$) and maximum $3.5305\ldots$ (at $n=852$). \begin{remark}[Uniformity in $(a,b)$]\label{rem:uniform} The constant in $g(n)=\log_\mu n+O(1)$ cannot be chosen independently of $(a,b)$, at least from below. Indeed $g(2)=b$ for every pair: the two stones go to $a$ and $b$ and stay there as singletons, i.e.\ $2=\beta^a+\beta^b$. On the other hand $\mu\to1$ quickly. For $(1,b)$ the roots of smallest modulus lie near $e^{\pm2\pi i/b}$, and from $x^b=2-x$ we get $\abs{x}^b=\abs{2-x}\approx\abs{2-e^{2\pi i/b}}\approx1+4\pi^2/b^2$, so heuristically $\mu-1\approx4\pi^2/b^3$; numerically $(\mu-1)b^3/4\pi^2=0.80,\,0.91,\,0.96,\,0.98$ for $b=20,40,80,160$. Hence $\log_\mu2\approx(\log2/4\pi^2)\,b^3$; for instance $\log_\mu 2\approx1237$ for $(1,40)$, while $g(2)=40$. This is consistent with the lower bound in the proof above, whose constant $\log_\mu(\mu-1)-1$ is of order $-b^3\log b$ in this family. The offset does not fade as $n$ grows. For random $n$ between $10^5$ and $10^{200}$, the quantity $g(n)-\log_\mu n$ stays in a band of width about $20$ to $50$, centred near $-61$, $-265$ and $-744$ for $(1,10)$, $(1,15)$ and $(1,20)$ respectively, with no visible dependence on the size of $n$. A heuristic explanation: writing $n=\sum_{s\le g}e_s\beta^s=\beta^g\sum_{t\ge0}e_{g-t}\beta^{-t}$, the inner sum behaves like a random sum of size about $(2(\mu-1))^{-1/2}$, which predicts an offset near $-\log_\mu\bigl((2(\mu-1))^{-1/2}\bigr)$, i.e.\ about $-62$, $-236$ and $-610$ in these three cases. \end{remark} \begin{question} Is there an absolute constant $C$ with $g(n)\le\log_\mu n+C$ for all coprime $1\le a0$, so the order of $\zeta^a$ is a power of $2$. Write $N=2^kN'$ with $N'$ odd; the order of $\zeta^{a}=\zeta^{2^j}$ is $2^{k-j}N'$, so $N'=1$. Thus $N=2^k$, $v(1-\zeta)=2^{1-k}$, $v(1-\zeta^a)=2^{1-(k-j)}$, and \eqref{eq:rouval} becomes $2^{1-k+j}=2^{1-k}+2^{-j}$, i.e.\ $2^{j}=1+2^{k-1-j}$. As $j\ge1$ the left side is even, so $k-1-j=0$ and then $j=1$: $(a,b)=(2,3)$. \end{proof} For $(2,3)$ the roots are $-1\pm i$, with ratio $\pm i$, so the exception is genuine. Proposition~\ref{prop:rou} has also been confirmed numerically for all coprime pairs with $b\le18$, and by an exact computation (cyclotomic factors of $\mathrm{Res}_y(P(y),P(xy))$) for $b\le9$. \begin{proof}[Proof of Theorem~\ref{thm:f}(b)] For $(1,2)$, $4^k=(-2)^{2k}$ has a single digit. For $(2,3)$, $(-1+i)^4=-4$, so $16^k=(-1+i)^{8k}$ has a single digit. \end{proof} \begin{remark}\label{rem:sunit} Conversely, if some power $\beta^m$ ($m\ge1$) of a root of $P$ is a rational integer $r$, then $f(r^{2k})=1$ for all $k$; by Proposition~\ref{prop:rou} this happens only for $(1,2)$ and $(2,3)$. For the other pairs there is a short ineffective proof that $f(n)\to\infty$: for two roots $\beta\ne\gamma$, the expansion of an integer $n$ gives $\sum_{s\in\Dig(n)}(\beta^s-\gamma^s)=0$, an equation in $S$-units for the primes above $2$, and the finiteness theorem for non-degenerate $S$-unit equations \cite{Evertse,vdPS} (see also \cite[Theorem~1.19 and \S1.5]{EPSW}) shows that only finitely many $n$ have $f(n)\le F$, for each $F$. (Each minimal vanishing subsum contains powers of both roots, by Lemma~\ref{lem:ring}(2) and the irreducibility of $P$, and a common scalar relating two solutions of the same shape is then of the form $\beta^u=\gamma^v$, which forces $u=v=0$ by Proposition~\ref{prop:rou} and a comparison of norms.) This is an analogue of the theorem of Senge and Straus \cite{SS} for two integer bases; for related applications of $S$-unit equations to digit expansions see Peth\H{o} and Tichy \cite{PT}. The next section gives an effective version, in the spirit of Stewart \cite{Stewart}. \end{remark} \section{An effective lower bound for the number of singletons}\label{sec:effective} In this section we prove Theorem~\ref{thm:f}(a). The method is that of Stewart~\cite{Stewart}: a large gap in the digit set produces a very small value of a linear form in logarithms, which is impossible by Baker's theory. \subsection{Tools} We write $h$ for the absolute logarithmic Weil height. We use the following standard facts \cite[Ch.~3]{Waldschmidt}: $h(xy)\le h(x)+h(y)$, $h(x^{-1})=h(x)$, $h(x^t)=\abs t\,h(x)$ for $t\in\Z$, conjugate numbers have the same height, $h(x)=0$ if and only if $x$ is $0$ or a root of unity (Kronecker), and for an algebraic integer $x$ in a number field $F$ of degree $\delta$, \begin{equation}\label{eq:hint} h(x)=\frac1\delta\sum_{\sigma:F\to\C}\log\max(1,\abs{\sigma(x)}). \end{equation} \begin{theorem}[Matveev {\cite[Corollary~2.3]{Matveev}}]\label{thm:matveev} Let $L$ be a number field of degree $D$, let $\gamma_1,\dots,\gamma_k\in L$ be nonzero, and let $b_1,\dots,b_k\in\Z$. Put $B=\max\abs{b_i}$ and $\Lambda=\gamma_1^{b_1}\cdots\gamma_k^{b_k}-1$, and let $A_i\ge\max\{D\,h(\gamma_i),\abs{\log\gamma_i},0.16\}$, where $\log$ is the principal branch. If $\Lambda\ne0$ then \[ \log\abs\Lambda>-3\cdot30^{k+4}(k+1)^{5.5}D^2(1+\log D)(1+\log kB)\,A_1\cdots A_k . \] \end{theorem} \subsection{Setting} Fix coprime $1\le a1$; recall $\prod\rho_j=\abs{P(0)}=2$. The equation $x^a+x^b=2$ has no real solution with $\abs x>1$ unless $a$ is odd and $b$ is even, and then exactly one; so $P$ has at most one real root, and since $\delta\ge2$ (and the roots of $P_{1,3}$ are not real) $P$ has a non-real root, and (as the choice of root does not matter) we take $\beta$ to be one. Put \[ \rho=\abs\beta,\qquad \gamma=\beta/\bar\beta,\qquad \eta=h(\gamma),\qquad \kappa=\sum_{j=1}^{\delta}\log^+\frac1{\rho_j-1},\qquad c_P=\prod_{\beta_j\ne\beta,\bar\beta}(\rho_j-1). \] By Proposition~\ref{prop:rou}, $\gamma$ is not a root of unity, so $\eta>0$. The $\beta_j$ are the conjugates of $\beta$ (Lemma~\ref{lem:roots}). A \emph{block} is a polynomial $A(x)=\sum_{j=0}^{d}\varepsilon_jx^j$ with $\varepsilon_j\in\{0,1\}$ and $\varepsilon_0=1$; we call $d$ its \emph{depth} (we do not require $\varepsilon_d=1$). \begin{lemma}\label{lem:block} Let $A$ be a block of depth $d$. Then \begin{enumerate} \item $\abs{A(\beta_j)}<\rho_j^{d+1}/(\rho_j-1)$ for every $j$; \item $\abs{A(\beta)}\ge c_P^{1/2}\,(\rho/\sqrt2)^{d+1}$; in particular $A(\beta)\ne0$; \item $h(A(\beta))\le\bigl((d+1)\log2+\kappa\bigr)/\delta$, and $h\bigl(A(\beta)/A(\bar\beta)\bigr)\le 2\bigl((d+1)\log2+\kappa\bigr)/\delta$. \end{enumerate} \end{lemma} \begin{proof} (1) $\abs{A(\beta_j)}\le\sum_{i=0}^d\rho_j^i$. (2) By Lemma~\ref{lem:ring}(2), the algebraic integer $A(\beta)$ is nonzero, so its norm $\prod_jA(\beta_j)$ is a nonzero rational integer and, by (1), \[\abs{A(\beta)}^2=\abs{A(\beta)A(\bar\beta)}\ge\prod_{\beta_j\ne\beta,\bar\beta}\abs{A(\beta_j)}^{-1} \ge c_P\prod_{\beta_j\ne\beta,\bar\beta}\rho_j^{-(d+1)}=c_P(\rho^2/2)^{d+1}.\] (3) By \eqref{eq:hint} and (1), $\delta\,h(A(\beta))\le\sum_j\bigl((d+1)\log\rho_j+\log^+\frac1{\rho_j-1}\bigr) =(d+1)\log2+\kappa$. The second bound follows since $A(\bar\beta)$ is conjugate to $A(\beta)$. \end{proof} \subsection{The gap lemma} Let $n\ne0$ be an integer with a finite expansion, $\Dig(n)=\{s_1<\dots1$, $m=s_{i-1}$ and $G=t-m$. Then $A(x)=\sum_{s\in T}x^{s-t}$ is a block of depth $d$ and \begin{equation}\label{eq:split} n=\beta^tA(\beta)+r(\beta)=\bar\beta^tA(\bar\beta)+r(\bar\beta),\qquad r(x)=\sum_{j1$ and $\beta^tA(\beta)$ is not real, then \[ G\log\rho<\log\frac{2\rho}{(\rho-1)\sqrt{c_P}}+(d+1)\log^+\frac{\sqrt2}{\rho} +C_M\,(1+\log 2t)\,A_1A_2(d), \] where $D=[\Q(\beta,\bar\beta):\Q]\le\delta(\delta-1)$, $C_M=3\cdot30^6\cdot3^{5.5}D^2(1+\log D)$, $A_1=\max(D\eta,\pi)$ and $A_2(d)=\max\bigl(2D((d+1)\log2+\kappa)/\delta,\pi\bigr)$. \end{enumerate} In either case, for $i>1$, $G\le c_7\,(d+1)\,(1+\log 2g)$ with an effectively computable $c_7=c_7(a,b)$. \end{lemma} \begin{proof} (1) If $\beta^tA(\beta)$ is real it equals its complex conjugate $\bar\beta^tA(\bar\beta)$, so $\gamma^t=A(\bar\beta)/A(\beta)$ and, by Lemma~\ref{lem:block}(3), $t\eta=h(\gamma^t)\le2((d+1)\log2+\kappa)/\delta\le c_3\eta(d+1)$. For $i=1$ the number $\beta^tA(\beta)=n$ is real. (2) Put $\Lambda=\gamma^t\cdot\bigl(A(\beta)/A(\bar\beta)\bigr)-1$. By assumption $\Lambda\ne0$, and by \eqref{eq:split} and Lemma~\ref{lem:block}(2) \[ \abs\Lambda=\frac{\abs{r(\bar\beta)-r(\beta)}}{\abs{\bar\beta^tA(\bar\beta)}} <\frac{2\rho^{m+1}}{(\rho-1)\rho^{t}\sqrt{c_P}}\Bigl(\frac{\sqrt2}{\rho}\Bigr)^{d+1}. \] Apply Theorem~\ref{thm:matveev} in $L=\Q(\beta,\bar\beta)$ with $k=2$, $\gamma_1=\gamma$, $b_1=t\ge1$, $\gamma_2=A(\beta)/A(\bar\beta)$, $b_2=1$, so $B=t$. Both $\gamma_i$ have absolute value $1$, so $\abs{\log\gamma_i}\le\pi$, and $A_1$, $A_2(d)$ are admissible by Lemma~\ref{lem:block}(3). Comparing the two bounds for $\log\abs\Lambda$ gives (2). For the last statement note $t\le g$ and $G\le t$, and that $A_2(d)\le c(d+1)$. \end{proof} \begin{remark} Case (1) really occurs: if $(a,b)=(1,3)$ and $01$. By Theorem~\ref{thm:g} and its proof, $\log_\mu n-c\le g\le\log_\mu n+c$ with an effectively computable $c$ (the constant $M$ there is found by a finite enumeration); together with $g+1\ge1$ this gives $\log((g+1)/(1+c_3))\ge\ell-c_8$ and $\log(1+c_7(1+\log2g))\le\log\ell+c_9$. Put $C=\max(c_8,c_9)$. If $\ell\ell/(\log\ell+C)$. \qed \subsection{The case \texorpdfstring{$(1,3)$}{(1,3)} with an explicit constant} Here $\beta=\alpha$, $\delta=D=2$, $\rho=\sqrt2$, $c_P=1$, and $\gamma=\alpha/\bar\alpha$ is a root of $2x^2+3x+2$, so $\eta=h(\gamma)=\frac12\log2$ and $\abs{\log\gamma}<2.42$. We sharpen Lemma~\ref{lem:block}: for a block $A$ of depth $d$, $\abs{A(\alpha)}\ge1$, $\abs{A(\alpha)}<2^{(d+1)/2}(1+\sqrt2)$, and, since $A(\alpha)/A(\bar\alpha)$ is a root of the integer polynomial $N x^2-\mathrm{Tr}\bigl(A(\alpha)^2\bigr)x+N$ with $N=\abs{A(\alpha)}^2$, whose roots have absolute value $1$, \[ 2\,h\bigl(A(\alpha)/A(\bar\alpha)\bigr)\le\log\abs{A(\alpha)}^2<(d+1)\log2+2\log(1+\sqrt2)<(d+1)\log2+1.77 . \] \emph{Case (1) of the gap lemma.} If $\alpha^tA(\alpha)=:M$ is real, then $t\cdot\frac12\log2\le\frac12\bigl((d+1)\log2+1.77\bigr)$, so $t-2.4$). Let $\ell\ge3.4$. By Theorem~\ref{thm:g}, $g+7>2\log_2n+3.45>2.885\log n$, so $\log((g+7)/10)>\ell-1.25$; and $2g\le4\log_2n+14<6.24\log n$, so $\mathcal L<\ell+2.84\le1.84\,\ell$ and $1+C_1\mathcal L<2C_1\ell$. Since $\log(2C_1)<32$, \[ f(n)=r>1+\frac{\ell-1.25}{\log\ell+32}>\frac{\ell}{\log\ell+32}. \] \qed \begin{remark} (1) Compared with \cite{Stewart,Sharma}, three features of our setting simplify the argument. The two expansions (in bases $\beta$ and $\bar\beta$) have the same digit set, so a gap in one is a gap in the other and no pigeonhole argument over scales is needed; this is why there is no factor $\frac12$. The leading block cannot be small, by the norm inequality of Lemma~\ref{lem:block}(2). And the degenerate case $\Lambda=0$ is disposed of by comparing heights. (2) Using a complex-conjugate pair of roots is essential for the method. For two roots $\beta,\beta'$ with $\abs\beta>\abs{\beta'}$ the analogue of \eqref{eq:split} gives only $\abs\Lambda\ll\abs\beta^{m}\abs{\beta'}^{-t}c^{d}$, which is small only when the gap $G=t-m$ exceeds a constant multiple of $m$, rather than of the depth $d$, and the induction breaks down. \end{remark} \section{Small digit sums, averages and data for \texorpdfstring{$(1,3)$}{(1,3)}}\label{sec:data} Write $\alpha^k=p_k+q_k\alpha$ with $p_k,q_k\in\Z$. Then $p_{k+1}=-2q_k$ and $q_{k+1}=p_k-q_k$, so $q_{k+1}=-q_k-2q_{k-1}$: $(q_k)=(0,1,-1,-1,3,-1,-5,7,3,-17,\dots)$ is the Lucas sequence $U_k(-1,2)$ (OEIS A001607 \cite{OEIS}). A sum $\sum_{s\in A}\alpha^s$ is a rational integer iff $\sum_{s\in A}q_s=0$. By a classical result going back to Nagell (see \cite{OEIS} and Cassels \cite[p.~67]{Cassels}), $q_k=\pm1$ only for $k\in\{1,2,3,5,13\}$; this is equivalent to the Ramanujan--Nagell theorem on $x^2+7=2^m$. Note also that $q_k\equiv3\pmod4$ for all $k\ge2$, by induction from the recurrence. \begin{lemma}\label{lem:odd} For $(a,b)=(1,3)$ and every $n\ge1$, $f(n)\equiv n\pmod 2$, and if $n$ is even then $\Dig(n+1)=\Dig(n)\cup\{0\}$. Consequently $\{n:f(n)=2j+1\}=\{m+1:f(m)=2j\}$ for every $j\ge0$. \end{lemma} \begin{proof} By Theorem~\ref{thm:main}(c), $f(n)\equiv n\pmod 4$ (if the process terminates, $f(n)=n$). Position $0$ holds $n$ stones, so $0\in\Dig(n)$ iff $n$ is odd. If $n$ is even, then $n+1=1+\sum_{s\in\Dig(n)}\alpha^s$ with $0\notin\Dig(n)$, and uniqueness gives $\Dig(n+1)=\Dig(n)\cup\{0\}$. The last statement follows, as $f(m)$ even forces $m$ even. \end{proof} \begin{proof}[Proof of Proposition~\ref{prop:small}] By Theorem~\ref{thm:main}(c), $f(n)\equiv n\pmod4$ for all $n$ (if the process terminates, $f(n)=n$). Also $0\in\Dig(n)$ iff $n$ is odd. If $f(n)=1$ then $n$ is odd, so $\Dig(n)=\{0\}$ and $n=1$. If $f(n)=2$ then $n\equiv2\pmod4$. So $0\notin\Dig(n)$, and position $1$, whose only source of stones is position $0$, holds $n/2$ stones, an odd number; hence $1\in\Dig(n)$ and $n=\alpha+\alpha^t$ with $t\ge2$. (Alternatively: two terms $q_s,q_t$ with $s,t\ge2$ cannot sum to $0$, since both are $\equiv3\pmod 4$.) Then $q_t=-q_1=-1$, so $t\in\{2,3,5,13\}$, and $\alpha+\alpha^t$ equals $-2,2,-6,90$ respectively. Hence $n\in\{2,90\}$, and indeed $f(2)=f(90)=2$. If $f(n)=3$, then by Lemma~\ref{lem:odd} $n-1$ has $f(n-1)=2$, so $n\in\{3,91\}$; conversely $f(3)=f(91)=3$. \end{proof} \emph{Exhaustive searches.} For larger values of $f$ we only have numerical information. By Lemma~\ref{lem:odd} it suffices to consider even $F=f(n)$. For each even $F\le20$ and a bound $S$, we enumerated all sets $D\subseteq\{0,\dots,S\}$ of size $F$ with $\sum_{s\in D}q_s=0$ and $\sum_{s\in D}p_s>0$; these are exactly the positive integers $n$ with $f(n)=F$ and $g(n)\le S$. Table~\ref{tab:F} lists the results. In every case the largest exponent occurring is about $7.8F$, far below $S$; for $F=4$, for instance, raising $S$ from $160$ to $20000$ produced no new solutions. This is strong evidence, though not a proof, that the lists are complete. In particular the list for $F=4$ (40 values, the largest being $745744=\alpha^4+\alpha^{14}+\alpha^{30}+\alpha^{39}$) did not change. By Theorem~\ref{thm:f}(a) (or Remark~\ref{rem:sunit}) each full list is finite. \begin{table}[h] \centering \begin{tabular}{@{}rrrrr@{}} \toprule $F$ & $S$ & $\#\{n:f(n)=F,\ g(n)\le S\}$ & largest such $n$ & its $g(n)$\\ \midrule 2 & 20000 & 2 & $90$ & 13\\ 4 & 20000 & 40 & $745744$ & 39\\ 6 & 20000 & 102 & $754026$ & 39\\ 8 & 20000 & 1358 & $159427072$ & 55\\ 10 & 20000 & 3043 & $557587198042$ & 78\\ 12 & 20000 & 33720 & $\approx4.17\cdot10^{13}$ & 91\\ 14 & 1000 & 77041 & $\approx5.68\cdot10^{15}$ & 104\\ 16 & 1000 & 999433 & $\approx3.29\cdot10^{19}$ & 130\\ 18 & 1000 & 2387602 & $\approx3.58\cdot10^{20}$ & 137\\ 20 & 300 & 33473878 & $\approx3.57\cdot10^{23}$ & 156\\ \bottomrule \end{tabular} \caption{Positive integers with $f(n)=F$ and all digits at most $S$, for $(a,b)=(1,3)$. By Lemma~\ref{lem:odd}, the case $F+1$ is obtained by adding $1$.}\label{tab:F} \end{table} Writing $M(F)$ for the largest $n$ found with $f(n)\le F$, the ratio $\log_2M(F)/F$ stays between $3.25$ and $4.05$ for $6\le F\le20$, with no visible trend, and a least-squares fit gives $\log_2M(F)\approx3.9F$. Stewart-type bounds predict nothing of this kind: the quantity $\log\log M(F)/(F\log F)$ decreases steadily, from $0.47$ at $F=4$ to $0.067$ at $F=20$. The gaps between consecutive digits of the extremal examples are also small (at most $25$), much smaller than what the proof of Theorem~\ref{thm:f}(a) has to allow for. \begin{conjecture}\label{conj:log} There is $c>0$ such that $f(n)\ge c\log n$ for all $n\ge2$. (The data suggest $f(n)\gtrsim0.26\log_2n$ for large $n$.) \end{conjecture} Since $f(n)$ is on average about $\log_2 n$ (see below), the conjecture would say that the minimum of $f$ is within a constant factor of its average. \begin{question} Is $745744$ the largest $n$ with $f(n)=4$? \end{question} \emph{Averages.} Over $2^{19}\le n<2^{20}$ the mean of $f$ is $19.28$ and the mean of $g$ is $39$; so $f(n)$ is on average about half the number of digits. This is explained by the work of Dumont, Grabner and Thomas \cite{DGT} on the distribution of digits of rational integers in algebraic bases: their results apply to the base $\alpha$, whose conjugates $\alpha,\bar\alpha$ have the same modulus and an argument that is not a rational multiple of $\pi$ (as $\alpha/\bar\alpha$ is not a root of unity), and give \[ \sum_{n\le M}f_{1,3}(n)\sim M\log_2 M . \] The exceptional pair $(2,3)$ behaves differently: since $\gamma=-1+i$ satisfies $\gamma^4=-4$ and $\gamma^2+\gamma^3=2$, the base-$(-4)$ digits $0,1,2,3$ of $n$ expand into blocks of four base-$\gamma$ digits containing $0,1,2,3$ ones respectively, so $f_{2,3}(n)$ is the sum of the base-$(-4)$ digits of $n$, whose average is $\tfrac34\log_2 n$; see also \cite[Section~4]{GKP}. \begin{question} Make the constant $C_{a,b}$ of Theorem~\ref{thm:f}(a) explicit for all $(a,b)$. Is there an analogue of Conjecture~\ref{conj:log} for every pair $(a,b)\notin\{(1,2),(2,3)\}$? (For $(1,4)$, a smaller search shows the same linear growth of $\log M(F)$ in $F$.) \end{question} \medskip\noindent\textbf{An aside: Ramanujan--Nagell and continued fractions.}\par\smallskip Let $\theta=\arg(\alpha)/\pi=0.61502672\ldots$. We have $q_k=(\alpha^k-\bar\alpha^k)/(\alpha-\bar\alpha)$ and $\abs{\alpha-\bar\alpha}=\sqrt7$, so \[ \abs{q_k}=\frac{2^{k/2+1}}{\sqrt7}\,\abs{\sin(\pi k\theta)}, \qquad\text{so}\qquad \|k\theta\|\le\tfrac{\sqrt7}{4}\,\abs{q_k}\,2^{-k/2}, \] where $\|\cdot\|$ is the distance to the nearest integer. So a small value of $\abs{q_k}$ forces an unusually good rational approximation to $\theta$ with denominator $k$. The continued fraction of $\theta$ is $[0;1,1,1,1,2,16,6,1,2,2,13,\dots]$, with convergent denominators \[ 1,\ 2,\ 3,\ 5,\ 13,\ 213,\ 1291,\ 1504,\ 4299,\ \dots \] The first five are exactly the indices $k\in\{1,2,3,5,13\}$ with $\abs{q_k}=1$, that is, the solutions of the Ramanujan--Nagell equation. This is no accident: for each of these $k$ one checks that $\|k\theta\|<1/(2k)$, so by Legendre's theorem $k$ must be a convergent denominator. Nagell's theorem then says that the approximation stops being good enough at the next convergent: $\abs{q_{213}}>1$. (Numerically, $\abs{q_k}\ge2^{k/2-15.9}$ for all $k\le20000$.) \subsection*{Computations} The searches behind Table~\ref{tab:F} use exact integer arithmetic; their only pruning discards partial sums that cannot be cancelled by the remaining terms, and their output agrees with an unpruned meet-in-the-middle search for $F\le8$ and with direct computation of $f(n)$ for all $n\le10^6$. The integral bases behind Remark~\ref{rem:mono} were computed with Sage by the first author (and independently with SymPy for $b\le11$); the primes listed there were confirmed with Dedekind's criterion. The statistics in Remark~\ref{rem:index} use exact arithmetic modulo $p^2$ for all coprime pairs with $b<400$. The following were checked by direct simulation: the identity $S(n)=\Dig(n)$ for $(1,3)$ and $n<3000$; the wave shape $k\cdot P$, the identity $k(a+b)=n-f(n)$ and the first repetition at step $g+2$ for all coprime $(a,b)$ with $b\le7$ and $n<500$; the identity between $f_{2,3}(n)$ and the base-$(-4)$ digit sum for $n<5000$; the enumeration in the proof of Theorem~\ref{thm:g}; and Table~\ref{tab:N}, which by the initial-segment property only requires checking $n\le N(a,b)+1$. \subsection*{Acknowledgment} This note was prompted by a problem found at Project Euler \cite{PE}. We thank the Project Euler team for a delightful problem, and for encouraging us to publish this note. \begin{thebibliography}{99} \bibitem{AP} S.~Akiyama and A.~Peth\H{o}, On canonical number systems, \emph{Theoret. Comput. Sci.} \textbf{270} (2002), 921--933. \bibitem{Borodin} M.~Borodin, H.~Han, K.~Ji, T.~Khovanova, A.~Peng, D.~Sun, I.~Tu, J.~Yang, W.~Yang, K.~Zhang, K.~Zhao, Chip-firing and fractional bases, \emph{Minnesota J. Undergrad. Math.} \textbf{6} (2021); arXiv:1809.09676. \bibitem{Cassels} J.~W.~S.~Cassels, \emph{Local Fields}, Cambridge University Press, 1986. \bibitem{DGT} J.-M.~Dumont, P.~J.~Grabner and A.~Thomas, Distribution of the digits in the expansions of rational integers in algebraic bases, \emph{Acta Sci. Math. (Szeged)} \textbf{65} (1999), 469--492. \bibitem{Evertse} J.-H.~Evertse, On sums of $S$-units and linear recurrences, \emph{Compositio Math.} \textbf{53} (1984), 225--244. \bibitem{EPSW} G.~Everest, A.~van der Poorten, I.~Shparlinski and T.~Ward, \emph{Recurrence Sequences}, Mathematical Surveys and Monographs \textbf{104}, American Mathematical Society, 2003. \bibitem{FLP} A.~Fey, L.~Levine and Y.~Peres, Growth rates and explosions in sandpiles, \emph{J. Stat. Phys.} \textbf{138} (2010), 143--159. \bibitem{Gilbert} W.~J.~Gilbert, Radix representations of quadratic fields, \emph{J. Math. Anal. Appl.} \textbf{83} (1981), 264--274. \bibitem{GKP} P.~J.~Grabner, P.~Kirschenhofer and H.~Prodinger, The sum-of-digits function for complex bases, \emph{J. London Math. Soc. (2)} \textbf{57} (1998), 20--40. \bibitem{KK1} I.~K\'atai and B.~Kov\'acs, Kanonische Zahlensysteme in der Theorie der quadratischen algebraischen Zahlen, \emph{Acta Sci. Math. (Szeged)} \textbf{42} (1980), 99--107. \bibitem{KK2} I.~K\'atai and B.~Kov\'acs, Canonical number systems in imaginary quadratic fields, \emph{Acta Math. Acad. Sci. Hungar.} \textbf{37} (1981), 159--164. \bibitem{Knuth} D.~E.~Knuth, \emph{The Art of Computer Programming, Vol.~2: Seminumerical Algorithms}, 3rd ed., Addison--Wesley, 1998, \S4.1. \bibitem{Kovacs} B.~Kov\'acs, Canonical number systems in algebraic number fields, \emph{Acta Math. Acad. Sci. Hungar.} \textbf{37} (1981), 405--407. \bibitem{KP} B.~Kov\'acs and A.~Peth\H{o}, Number systems in integral domains, especially in orders of algebraic number fields, \emph{Acta Sci. Math. (Szeged)} \textbf{55} (1991), 287--299. \bibitem{Matveev} E.~M.~Matveev, An explicit lower bound for a homogeneous rational linear form in the logarithms of algebraic numbers.~II, \emph{Izv. Ross. Akad. Nauk Ser. Mat.} \textbf{64} (2000), 125--180; English transl. \emph{Izv. Math.} \textbf{64} (2000), 1217--1269. \bibitem{Ngai} S.-M.~Ngai, V.~F.~Sirvent, J.~J.~P.~Veerman and Y.~Wang, On 2-reptiles in the plane, \emph{Geom. Dedicata} \textbf{82} (2000), 325--344. \bibitem{OEIS} OEIS Foundation, Sequence A001607, \emph{The On-Line Encyclopedia of Integer Sequences}, \url{https://oeis.org/A001607}. \bibitem{Penney} W.~Penney, A ``binary'' system for complex numbers, \emph{J. ACM} \textbf{12} (1965), 247--248. \bibitem{PT} A.~Peth\H{o} and R.~F.~Tichy, $S$-unit equations, linear recurrences and digit expansions, \emph{Publ. Math. Debrecen} \textbf{42} (1993), 145--154. \bibitem{PE} Project Euler, \url{https://projecteuler.net}. \bibitem{SS} H.~G.~Senge and E.~G.~Straus, PV-numbers and sets of multiplicity, \emph{Period. Math. Hungar.} \textbf{3} (1973), 93--100. \bibitem{Sharma} D.~Sharma, On the representation of an imaginary quadratic integer in two different bases, \emph{Publ. Math. Debrecen} \textbf{107} (2025), 187--197; arXiv:2311.17348. \bibitem{Stewart} C.~L.~Stewart, On the representation of an integer in two different bases, \emph{J. Reine Angew. Math.} \textbf{319} (1980), 63--72. \bibitem{vdPS} A.~J.~van der Poorten and H.~P.~Schlickewei, Additive relations in fields, \emph{J. Austral. Math. Soc. Ser. A} \textbf{51} (1991), 154--170. \bibitem{Waldschmidt} M.~Waldschmidt, \emph{Diophantine Approximation on Linear Algebraic Groups}, Grundlehren der mathematischen Wissenschaften \textbf{326}, Springer, 2000. \end{thebibliography} \end{document}