<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">\documentclass[12pt,reqno]{article}

\usepackage[usenames]{color}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{amsfonts}
\usepackage{amscd}
\usepackage{graphicx}

\usepackage[colorlinks=true,
linkcolor=webgreen,
filecolor=webbrown,
citecolor=webgreen]{hyperref}

\definecolor{webgreen}{rgb}{0,.5,0}
\definecolor{webbrown}{rgb}{.6,0,0}

\usepackage{color}
\usepackage{fullpage}
\usepackage{float}

\usepackage{psfig}
\usepackage{graphics}
\usepackage{latexsym}
\usepackage{epsf}
\usepackage{breakurl}

\setlength{\textwidth}{6.5in}
\setlength{\oddsidemargin}{.1in}
\setlength{\evensidemargin}{.1in}
\setlength{\topmargin}{-.1in}
\setlength{\textheight}{8.4in}

\newcommand{\seqnum}[1]{\href{https://oeis.org/#1}{\rm \underline{#1}}}
\newcommand{\N}{{\mathbb{N}}}                                                  
\newcommand{\T}{x_{3/2}}                                                       
\newcommand{\Tt}{y_{3/2}}                                                      

\begin{document}

\begin{center}
\epsfxsize=4in
\leavevmode\epsffile{logo129.eps}
\end{center}

\theoremstyle{plain}
\newtheorem{theorem}{Theorem}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{proposition}[theorem]{Proposition}

\theoremstyle{definition}
\newtheorem{definition}[theorem]{Definition}
\newtheorem{example}[theorem]{Example}
\newtheorem{conjecture}[theorem]{Conjecture}

\theoremstyle{remark}
\newtheorem{remark}[theorem]{Remark}

\begin{center}
\vskip 1cm{\Large\bf 
The Thue--Morse Sequence in Base $3/2$
}
\vskip 1cm
F. M. Dekking \\
CWI Amsterdam and Delft University of Technology \\
Faculty EEMCS \\
P.O.~Box 5031\\
2600 GA Delft \\
The Netherlands\\
\href{mailto:F.M.Dekking@math.tudelft.nl}{\tt F.M.Dekking@math.tudelft.nl} \\
\end{center}

\vskip .2 in

\begin{abstract}
We discuss the base $3/2$ representation of the natural numbers. We
prove that the sum-of-digits function of the representation is a fixed
point of a $2$-block substitution on an infinite alphabet, and that this
implies that sum-of-digits function modulo $2$ of the representation is
a fixed point $\T$ of a $2$-block substitution on $\{0,1\}$. We prove
that $\T$ is invariant for taking the binary complement, and present
a list of conjectured properties of $\T$, which we think will be hard
to prove. Finally, we make a comparison with a variant of the base 3/2
representation, and give a general result on $p$-$q$-block substitutions.
\end{abstract}



\section{Introduction}


A natural number $N$ is written in base $3/2$ if $N$ has the form
 \begin{equation}\label{eq:exp}
    N= \sum_{i\ge 0} d_i\Big( \frac32\Big)^i,
 \end{equation}  
  with digits $d_i=0,1$ or $2$.

Base $3/2$ representations are also known  as sesquinary representations of the natural numbers; see  Propp \cite{Propp}.
  We  write these expansions as
  $${\rm SQ}(N) = d_R(N)\cdots d_1(N)d_0(N)= d_R\cdots d_1d_0.$$

  \noindent We have, for example, ${\rm SQ}(7)=211$, since $2\cdot(9/4)+(3/2)+1=7$.
See \seqnum{A024629} for the continuation of Table \ref{SQ}.
Ignoring leading $0$'s, the base $3/2$ representation of a number $N$ is unique (see Section \ref{sec:32}).

\begin{table}[H]
\begin{center}
\begin{tabular}{c|cccccccccccccccccccccc}
$N$ &amp; 0 &amp; 1 &amp; 2 &amp; 3 &amp; 4 &amp; 5 &amp; 6 &amp; 7 &amp; 8 &amp; 9 &amp; 10\\ \hline ${\rm SQ}(N)$ &amp; 0 &amp; 1 &amp; 2 &amp; 20 &amp; 21 &amp; 22 &amp; 210 &amp; 211 &amp; 212 &amp; 2100 &amp; 2101 \end{tabular} \end{center} 
\caption{Base $3/2$ expansions for $N=1,\ldots,10$.} \label{SQ} 
\end{table}
For $N\ge 0$ let
  $$s_{3/2}(N):=\sum_{i=0}^{i=R} d_i(N)$$
be the sum-of-digits function of the base $3/2$ expansions. We have (see \seqnum{A244040})
  $$s_{3/2} = 0, 1, 2, 2, 3, 4, 3, 4, 5, 3, 4, 5, 5, 6, 7, 4, 5, 6, 5, 6, 7, 7, 8, 9, 5, 6, 7, 5, 6, 7, 7, 8, 9, 8, 9, 10,\ldots$$

  In this note we  study the base $3/2$ analogue of the Thue--Morse sequence \seqnum{A010060} (where the base equals 2), i.e., the sequence (see \seqnum{A357448})
  $$(\T(N)):= (s_{3/2}(N) \bmod 2) \,= \, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 1,\ldots $$

The Thue Morse sequence is the fixed point starting with 0 of the substitution $0\rightarrow 01,\;1\rightarrow 10$. This might be called a 1-$2$-block substitution.
 
Let $p\le q$ be two natural numbers. A {\it p-q-block substitution} $\kappa$ on an alphabet $A$ is a map
$\kappa:\: A^p\rightarrow A^q$.  
 A $p$-$q$-block substitution $\kappa$ acts on $(A^p)^*$ by defining
 $$\kappa(w_1w_2\cdots w_{pm-1}w_{pm}) = \kappa(w_1\cdots w_p)\cdots \kappa(w_{pm-p+1}\cdots w_{pm})$$
 for $w_1w_2\cdots w_{pm-1}w_{pm}\in (A^p)^*$ and $m=1,2,\ldots$.
Its action extends to infinite sequences 
$x=x_0x_1\cdots$ by defining $\kappa: x \mapsto y$ by 
$y_{qm}\cdots y_{qm+q-1}=\kappa(x_{pm}\cdots x_{pm+p-1}) $
for $m=0,1,\ldots$.


\begin{theorem} \label{th:main} The sequence $\T$ is a fixed point of the $2$-$3$-block substitution
\begin{displaymath}
\kappa: \begin{cases}
00 &amp; \rightarrow \ 010\\[-.1cm]
01 &amp; \rightarrow \ 010  \\[-.1cm]
10 &amp; \rightarrow \ 101  \\[-.1cm]
11 &amp; \rightarrow \ 101
\end{cases}
\end{displaymath}
\end{theorem}


Theorem \ref{th:main} will be proved in Section \ref{subs:TM}.

\section{Sum of digits function and Thue--Morse in base $3/2$}\label{sec:AA}

\subsection{Sum of digits function in base $3/2$}\label{subs:SD}

Let  $s_{3/2}=(0, 1, 2, 2, 3, 4, 3, 4, 5, 3, 4, 5, 5, 6, 7, 4, 5,\ldots)$   be the sum-of-digits function of the base $3/2$ expansions. To describe this sequence, we extend the notion of a $p$-$q$-block substitution to alphabets of infinite cardinality.


\begin{theorem}\label{th:SD} The sequence  $s_{3/2}$ is the fixed point starting with $0$ of the $2$-$3$-block substitution given by
$$a,b \mapsto a,a+1,a+2 \quad {\rm  for\;} a = 0,1,2,\ldots {\;\rm and\;} b = 0,1,2,\ldots.$$
\end{theorem}
	

\begin{proof} We have $d(0)=0,d(1)=1$ and from the uniqueness of the base $3/2$ expansions it follows immediately that $d(3N+r) = d(2N)+r$ for $N\ge 0$ and $r = 0, 1, 2. $

Thus $s_{3/2}(3N)=s_{3/2}(2N), s_{3/2}(3N+1)=s_{3/2}(2N)+1$,  and $s_{3/2}(3N+2)=s_{3/2}(2N)+2$. This gives the result. \end{proof}

\begin{remark} The base-$4/3$ version of this sequence is \seqnum{A244041}; the base-$2$ version  is \seqnum{A000120};
the base-$3$ version is \seqnum{A053735}; the base-$10$ version is \seqnum{A007953}. \end{remark}		


\subsection{Thue--Morse in base $3/2$}\label{subs:TM}

\begin{proof}[Proof of Theorem~\ref{th:main}.] This follows directly from Theorem \ref{th:SD} by taking $a$ and $b$ modulo $2$.  \end{proof}

Although iterates of $\kappa: 00\rightarrow010, 01\rightarrow010, 10\rightarrow101, 11\rightarrow101$ are undefined, we can generate the fixed point $\T$ by iteration of a map $\kappa'$ defined by
$\kappa'(w) = \kappa(w)$ if $w$ has even length, and $\kappa'(v) = \kappa(w)$ if $v = w0$ or $v = w1$ has odd length.

The fact that the iterates of $\kappa$ are undefined causes difficulty in establishing properties of $\T$.
This is similar to the  lack of progress in the last 25 years to prove the conjectures on the Kolakoski sequence, 
which is also a fixed point of a $2$-block substitution (cf.\ the papers \cite{Dekking-Kol, Two-block}).
Here is a property that is open for the Kolakoski sequence \seqnum{A000002}, but can be proved for $\T$.

\begin{proposition} If a word $w$ occurs in $\T$, then its binary complement  $\overline{w}$ defined  by $\overline{0}=1, \overline{1}=0$, also occurs in $\T$.
\end{proposition}

\begin{proof}  First one checks this for all 16 words of length 6 that occur in $\T$. Note that then also $\overline{w}$ occurs for all $w$ with $|w|\le 6$,
where $|w|$ denotes the length of $w$. Let $u$ be a word of length $m\ge 7$. By adding at most 3 letters at the beginning and/or end of $u$ one can obtain a word $v$ with $|v|=3n$ that occurs in $\T$ at a position $0$ modulo $3$. But then Theorem \ref{th:main} gives that $v=\kappa(w)$ for at least one word $w$ occurring in $\T$. The length of $w$ is $|w|=2n$. Since $\overline{\kappa(w)} = \kappa(\overline{w})$ the  result follows by induction on $m=|u|$. For example, for $|u|=m=7$, one has $|v|= 9$, and so $|w|= 6$.   \end{proof}

Here are some conjectured properties of $\T$.

\begin{conjecture}$\T$ is reversal invariant, i.e., if the word $w=w_1\cdots w_m$ occurs in $\T$ then $\overleftarrow{w}=w_m\cdots w_1$ occurs in $\T$.\end{conjecture}

\begin{conjecture} $\T$ is uniformly recurrent, i.e., each word that occurs in $\T$ occurs infinitely often, with bounded gaps between consecutive occurrences.\end{conjecture}

\begin{conjecture} The frequencies $\mu[w]$ of the words $w$ occurring in $\T$ exist. Two conjectured values: $\mu[00] = 1/10,\; \mu[01] = 4/10$. \end{conjecture}

\begin{conjecture}$\mu$ is invariant for binary complements, i.e., $\mu[w]=\mu[\overline{w}]$ for all words $w$.\end{conjecture}

\begin{conjecture}$\mu$ is reversal invariant, i.e., $\mu[w]=\mu[\overleftarrow{w}]$ for all words $w$.\end{conjecture}


\begin{conjecture} {(Shallit)} The critical exponent (=largest number of repeated blocks) of $\T$ is $5$. \end{conjecture}

\section{Base $3/2$ and base $1/2\cdot3/2$}\label{sec:32}

Many authors refer to the paper \cite{Akiyama-Frougny} from  Akiyama,  Frougny, and  Sakarovitch for the properties of base $3/2$ expansions (see, e.g., Propp \cite{Propp} and  Rigo and Stipulanti \cite{Rigo-Stip}).
However, the $q/p$ expansions studied in  paper  \cite{Akiyama-Frougny} are different from the
$3/2$ expansions that are usually considered as in Equation (\ref{eq:exp}). In the paper \cite{Akiyama-Frougny}:
\begin{equation}\label{eq:frou}
    N= \sum_{i\ge 0} d_i\,\frac1p\Big( \frac{q}p\Big)^i,
 \end{equation}  
  with digits $d_i=0,1$ or $2$. We write  ${\rm AFS}(N)$ for the expansion of $N$.
  
\begin{remark} There is a small notational problem here: Akiyama,  Frougny, and  Sakarovitch write about $p/q$ expansions with $p&gt;q$, but in this note we consider $q/p$ expansions with $p\le q$. This fits better with the $p$-$q$-block substitutions, and with the order of $p$ and $q$ in the alphabet.
\end{remark}

Here is the table given in  the paper \cite{Akiyama-Frougny} for the case 3/2:
\begin{table}[H]
\begin{center}
\begin{tabular}{c|cccccccccccccccccccccc}
$N$ &amp; 0 &amp; 1 &amp; 2 &amp; 3 &amp; 4 &amp; 5 &amp; 6 &amp; 7 &amp; 8 &amp; 9 &amp; 10\\ \hline ${\rm AFS}(N)$ &amp; $\varepsilon$ &amp; 2 &amp; 21 &amp; 210 &amp; 212 &amp; 2101 &amp; 2120 &amp; 2122 &amp; 21011 &amp; 21200 &amp; 21202 \end{tabular} \end{center}
\caption{Base $1/2\cdot 3/2$ expansions for $N=1,\ldots,10$.} \label{AFS} 
\end{table}
\noindent These expansions will not even be found in the OEIS (at the moment).

The situation is clarified in the paper \cite{Frougny-Klouda} by Frougny and Klouda. They consider both representations, called, respectively,
base $p/q$ and base $1/q \cdot p/q$ representations. In the present note these are called respectively base $q/p$ and base $1/p \cdot q/p$ representations.


A combination of the results in  \cite{Akiyama-Frougny} and \cite{Frougny-Klouda} yields a proof of the uniqueness of the base $3/2$ expansions $({\rm QS}(N))$.
There is also a direct proof of uniqueness in the paper by Edgar et al.~\cite{Edgar-}; see Theorem 1.1.

Note that  ${\rm AFS}(N)={\rm QS}(2N)$ for $N&gt;0$. So uniqueness of the base $3/2$ representation implies immediately uniqueness of the $1/2\cdot3/2$ representation ${\rm AFS}(N)$. This observation obviously extends to  base $q/p$.


Next we consider the question whether also the sequence  $\Tt$, the sum-of-digits function modulo $2$ of the base  $1/2\cdot3/2$ representation, is a fixed point of a $2$-block substitution. This is indeed the case, and this $2$-block substitution is given by Rigo and Stipulanti in \cite{Rigo-Stip}.

\begin{theorem}{\rm(\cite{Rigo-Stip})} \label{th:mainy} $\Tt$ is the  fixed point with prefix $00$ of the $2$-$3$-block substitution
\begin{displaymath}
\kappa': \begin{cases}
00 &amp; \rightarrow\ 001\\[-.1cm]
01 &amp; \rightarrow\ 000  \\[-.1cm]
10 &amp; \rightarrow\ 111  \\[-.1cm]
11 &amp; \rightarrow\ 110
\end{cases}
\end{displaymath}
\end{theorem}

In the paper \cite{Rigo-Stip} the proof of Theorem \ref{th:mainy} is based on a  generalization of Cobham's theorem to what are called $\mathcal S$-automatic sequences built on tree languages with a periodic labeled signature.
Here we consider a more direct route, based on a simple closure property of $p$-$q$-block substitutions. Recall that a coding is a letter to letter map  from one alphabet to another.

\begin{theorem} \label{th:subseq} Let $x=(x(N))$ be a  fixed point of a  $p$-$q$-block substitution. Let $r$ be a positive integer. Then the sequence $(x(rN))$ is  the fixed point of a coding of a $p$-$q$-block substitution.
\end{theorem}

\begin{proof} If $x$ is a fixed point of a  $p$-$q$-block substitution, then $x$ is also a fixed point of a  $pr$-$qr$-block substitution. As new alphabet, take the words of length $r$ occurring in $x$. On this alphabet, the $pr$-$qr$-block substitution induces a $p$-$q$-block substitution in an obvious way. Mapping each word of length $r$ to its first letter is a coding that gives the result. \end{proof}

\begin{proof}[Alternative proof for Theorem \ref{th:mainy}.] Apply Theorem \ref{th:subseq} with $r=2$. The $4$-$6$-block substitution is given by
\begin{align*}
&amp; 0010\rightarrow 010101,\;  0100\rightarrow 010010,\;  0101\rightarrow 010010,\; 0110\rightarrow 010101,   \\
&amp; 1001\rightarrow 101010,\;  1010\rightarrow 101101,\;  1011\rightarrow 101101,\; 1101\rightarrow 101010.
\end{align*}     
Coding $00\mapsto a,\, 01\mapsto b,\, 10\mapsto c,\, 11\mapsto d$, this induces the 2-3-block substitution
$$ ac\rightarrow bbb, ba\rightarrow bac, bb \rightarrow bac, bc \rightarrow bbb, cb \rightarrow ccc, cc \rightarrow cdb, cd \rightarrow cdb, db \rightarrow ccc.$$
If we code further $a,b\mapsto 0$, and $c,d\mapsto 1$, then we obtain $\kappa'$ from Theorem \ref{th:mainy}.  \end{proof}

\section{Acknowledgment} I am grateful to Jean-Paul Allouche for several useful comments. I also thank an anonymous referee for useful remarks.

\bibliographystyle{jis}

\begin{thebibliography}{9}

\bibitem{Akiyama-Frougny} S.~Akiyama, C.~Frougny, and J.~Sakarovitch, Powers of rationals modulo 1 and rational base number systems, \textit{Israel J. Math.} \textbf{168} (2008), 53--91.

\bibitem{Dekking-Kol} F.~M.~Dekking, What is the long range order in the Kolakoski sequence?, in 
{\it The Mathematics of Long-Range Aperiodic Order},
NATO Adv.~Sci.~Inst.~Ser.~C Math.~Phys.~Sci., Vol.\ 489,
Kluwer Acad.~Publ., 1997, pp.~115--125.

\bibitem{Two-block} F.~M.~Dekking and M.~Keane, Two-block substitutions and morphic words, arxiv preprint arXiv:2202.13548 [math.CO], 2022.  Available at \url{https://arxiv.org/abs/2202.13548}.


\bibitem{Edgar-} T. Edgar, H. Olafson, and J. Van Alstine, Some combinatorics of rational base representations, preprint, 2014.
 Available at \url{ https://community.plu.edu/~edgartj/preprints/basepqarithmetic.pdf}.

\bibitem{Frougny-Klouda} C.~Frougny and K.~Klouda, Rational base number systems for $p$-adic numbers, \textit{RAIRO Theor. Inform. Appl.} \textbf{46}  (2019), 87--106.

\bibitem{Propp} J.~Propp, How do you write one hundred in base 3/2?
Available at \url{https://tinyurl.com/2p9auyz6}.   Accessed January 2023.

\bibitem{Rigo-Stip} M.~Rigo and M.~Stipulanti, Automatic sequences: from rational bases to trees,
\textit{Disc. Math. Theor. Comput. Sci.} \textbf{24} (2022), \#25.

\bibitem{oeis} N. J. A. Sloane et al., {\it On-Line Encyclopedia of Integer Sequences}, electronically available at \url{https://oeis.org}, 2023.

\end{thebibliography}


\bigskip
\hrule
\bigskip

\noindent 2020 {\it Mathematics Subject Classification}: Primary 11B85, Secondary 68R15

\noindent \emph{Keywords:} Base $3/2$, Thue--Morse sequence,
sum of digits, two-block substitution.

\bigskip
\hrule
\bigskip

\noindent (Concerned with sequences
\seqnum{A000002},
\seqnum{A000120},
\seqnum{A007953},
\seqnum{A010060},
\seqnum{A024629},
\seqnum{A053735},
\seqnum{A244040},
\seqnum{A244041}, and
\seqnum{A357448}.)

\bigskip
\hrule
\bigskip

\vspace*{+.1in}
\noindent
Received February 9 2023;
revised version received February 12 2023. 
Published in {\it Journal of Integer Sequences}, February 23 2023.

\bigskip
\hrule
\bigskip

\noindent
Return to
\htmladdnormallink{Journal of Integer Sequences home page}{https://cs.uwaterloo.ca/journals/JIS/}.
\vskip .1in


\end{document}

                                                                                

</pre></body></html>