<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{graphicx}
\usepackage{amscd}

\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,amsmath,amssymb}
\usepackage{amsthm}
\usepackage{amsfonts}
\usepackage{latexsym}
\usepackage{epsf}

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

\newcommand{\seqnum}[1]{\href{http://oeis.org/#1}{\underline{#1}}}

\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 
Transcendence of Digital Expansions \\
\vskip .02in
Generated by a Generalized Thue-Morse \\
\vskip .10in
Sequence
}
\vskip 1cm
\large
Eiji Miyanohara \\
Graduate School of Fundamental Science and Engineering\\
Waseda University\\
3-4-1 Okubo, Shinjuku\\
Tokyo 169-8555 \\
Japan\\
\href{mailto:j1o9t5acrmo@fuji.waseda.jp}{\tt j1o9t5acrmo@fuji.waseda.jp}
\end{center}

\vskip .2 in

\begin{abstract}
In this article, first we generalize the Thue-Morse sequence by means of a
cyclic permutation and the $k$-adic expansion of non-negative integers,
giving a sequence $(a(n))_{n=0}^\infty$, and consider the condition that
$(a(n))_{n=0}^\infty$ is non-periodic. Next, we show that, if a
generalized Thue-Morse sequence $(a(n))_{n=0}^\infty$ is not periodic,
then no subsequence of the form $(a(N+nl))_{n=0}^\infty$ (where $N \ge
0$ and  $l&gt;0$) is periodic. We apply the combinatorial transcendence
criterion established by Adamczewski, Bugeaud, Luca, and Bugeaud to
find that, for a non-periodic generalized Thue-Morse sequence taking
its values in $\{0,1,\ldots,\beta-1\}$ (where $\beta$ is an integer
greater than $1$), the series $\sum_{n=0}^\infty a(N+nl)
{\beta}^{-n-1}$ gives a transcendental number. Furthermore, for
non-periodic generalized Thue-Morse sequences taking positive integer
values, the continued fraction $[0, a(N), a(N+l),\ldots,a(N+nl ), ...
]$ gives a transcendental number.
\end{abstract}

\section{Introduction}\label{s:1}


First we introduce the Thue-Morse sequence, defined by digit counting. Let $k$ be an integer greater than $1$. We define the $k$-adic expansion of a
non-negative integer $n$ as follows:
\begin{align}\label{eq1.1}
n=\sum_{q=1}^{{\rm finite}}  s_{n,q} k^{w_n(q)},
\end{align}
where $1\le s_{n,q}\le k-1, 0\le w_n(q) &lt;w_n(q+1)$. For any integer $s$ in $\{1,\ldots,k-1\}$, let $e_s(n)$ denote the number of occurrences of $s$ in the base $k$ representation of $n$. For an integer $L$ greater than $1$, we define a sequence $(e_s^L(n))_{n=0}^\infty$ by
\begin{align}\label{eq1.2}
 e_s^L(n) \equiv e_s(n) \quad \pmod{L},
\end{align}
where $0\le e_s^L(n)\le L-1$, $e_s(0)=0$. Then $(e_1^2(n))_{n=0}^\infty$, where $k=2$, is known as the Thue-Morse sequence. The Thue-Morse sequence has several definitions. See \cite{Emma,Ber-Ri,Fo}.


Now we introduce a new sequence. Let $K$ be a map, 
\[
     K : \{1,\dots, k-1 \} \longrightarrow \{0,1, \dots, L-1 \}.
\]
We define $(a(n))_{n=0}^\infty$ as
\begin{align}\label{eq1.3}
     a(n) \equiv \sum_{s=1}^{k-1} K(s)e_s^L(n) \pmod{L},
\end{align}
where $0\le a(n)\le L-1$.
Morton and Mourant \cite{MM} and Adamczewski and Bugeaud \cite{AB1} 
proved the following result.
\begin{theorem}[ \cite{MM,AB1}]\label{MM-AB}
Let $\beta \ge L$ be an integer. Then $\sum_{n=0}^\infty \frac{a(n)}{ {\beta}^{n+1}}$ is a transcendental number unless
\begin{align}\label{eq1.4}
               s K(1) \equiv K(s) \pmod{L}\; \; {\rm for\;all}\; 1\le  s \le k-1 \; \; {\rm and }\; \;   K(k-1)\equiv 0 \pmod{L}.
\end{align}
\end{theorem}

The proof of Theorem \ref{MM-AB} relies 
on the periodicity of $(a(n))_{n=0}^\infty$ \cite{MM} and the Cobham conjecture that was settled by Adamczewski and Bugeaud \cite{AB1}. More precisely,  Morton and Mourant \cite{MM} proved that $(a(n))_{n=0}^\infty$ is a $k$-automatic sequence for any map $K$ (see Definition \ref{de.5.3} in Section \ref{s:5} for the full definition). Furthermore, they proved that $(a(n))_{n=0}^\infty$ is periodic if and only if $(a(n))_{n=0}^\infty$ is purely periodic, which enabled them to prove that $(a(n))_{n=0}^\infty$ is periodic if and only if the map $K$ satisfies \eqref{eq1.4}. Later, Adamczewski and Bugeaud \cite{AB1} proved the Cobham conjecture by using the Schmidt subspace theorem. Thus they deduced Theorem \ref{MM-AB} by combining the results of Morton and Mourant with the Cobham conjecture.


Let us define a generalized Thue-Morse sequence as follows:
For any integer $s$ in $\{1,\ldots,k-1\}$ and any non-negative integer $y$, letting $d(n; s k^y)$ be $1$ or $0$, and $d(n; s k^y)$ satisfies that $d(n; s k^y)=1 $ if and only if there exists an integer $q$ such that $s_{n,q} k^{w_n(q)}= s k^y$.
Let $\kappa$ be a map,
\[
     \kappa : \{1,\dots, k-1 \} \times \mathbb{N} \longrightarrow \{0,1, \dots, L-1 \},
\]
where $\mathbb{N}$ denotes the set of non-negative integers. We define $(a(n))_{n=0}^\infty$ as
\begin{align}\label{eq1.5}
    a(n) \equiv \sum_{y=0}^\infty \sum_{s=1}^{k-1} \kappa (s, y)d(n; s k^y) \pmod{L},
\end{align}
where $0\le a(n)\le L-1$ and $a(0)=0$. We call $(a(n))_{n=0}^\infty$ a generalized Thue-Morse sequence of type $(L,k,\kappa)$. Thus the Thue-Morse sequence is the generalized Thue-Morse sequence of type $(2,2,\kappa)$ with $\kappa (1, y)=1$ for all $ y \in \mathbb{N}$. Moreover, if a generalized Thue-Morse sequence $(a(n))_{n=0}^\infty$ is of type $(L,k,\kappa)$ with
\begin{align}\label{eq1.6}
     \kappa (s,y)=\kappa (s,y+1)
\end{align} 
for all $s$ with $1\le  s\le k-1$ and for all $ y \in \mathbb{N}$, then $(a(n))_{n=0}^\infty$ coincides with the sequence defined by \eqref{eq1.3}, which satisfies the conditions $K(s)=\kappa (s,y)$ for all $s$ with $1\le  s\le k-1$. In this article, we generalize Theorem \ref{MM-AB}, as follows.
\begin{theorem}\label{th.1.2}
Let $(a(n))_{n=0}^\infty$ be a generalized Thue-Morse sequence of type $(L,k,\kappa)$. Let $\beta \ge L$ be an integer. If there is not an integer $A$ such that
\begin{align}\label{eq1.7}
\kappa(s,A+y) \equiv \kappa (1,A) s k^y    \pmod{L}
\end{align}
 for all $s$ with $1\le  s\le k-1$ and for all $ y \in \mathbb{N}$, then $\sum_{n=0}^\infty \frac{a(N+nl)}{ {\beta}^{n+1}}$ $($ for all $N \ge 0$ and for all $l &gt;0$ $)$ is a transcendental number.
\end{theorem}

By Theorem \ref{th.1.2}, one can find an uncountable quantity of  transcendental numbers. Moreover, if $\sum_{n=0}^\infty \frac{a(n)}{ {\beta}^{n+1}}$ is a transcendental number,  then $\sum_{n=0}^\infty \frac{a(N+nl)}{ {\beta}^{n+1}}$ $($ for all $N \ge 0$ and for all $l &gt;0$ $)$ is also a transcendental number. The proof of Theorem \ref{th.1.2} does not rely on the
pure periodicity of the periodic generalized Thue-Morse sequence $(a(n))_{n=0}^\infty$ and the Cobham conjecture. Here we study non-periodicity of the subsequence $(a(N+nl))_{n=0}^\infty$ $($ for all $N \ge 0$ and for all $l &gt;0$ $)$ of a generalized Thue-Morse sequence $(a(n))_{n=0}^\infty$. See also Morgenbesser, Shallit, and Stoll \cite{MSS}. Almost no generalized Thue-Morse sequence $(a(n))_{n=0}^\infty$ is $k$-automatic (see Proposition \ref{p.5.1} in Section \ref{s:5}). Therefore, the proof of Theorem \ref{th.1.2} is different from the proof of Theorem \ref{MM-AB}. We prove Theorem \ref{th.1.2} by combining Theorem \ref{th.3.1} in Section \ref{s:3} with the combinatorial transcendence criterion established by Adamczewski, Bugeaud, and Luca \cite{ABL}.


This paper is organized as follows. In Section \ref{s:2}, we review the basic concepts of the periodicity of sequences, and give the formal definition of the generalized Thue-Morse sequences. For a sequence $(a(n))_{n=0}^\infty$, we set its generating function $g(z) \in \mathbb{C}[[z]]$ to be 
\[
      g(z):=\sum_{n=0}^\infty a(n) z^n. 
\]
For a generalized Thue-Morse sequence, one can prove that the generating function is convergent on the open unit disk and that it has an infinite product expansion. In Section \ref{s:3}, first we prove the key lemma on the $k$-adic expansion of non-negative integers. Next, we use this lemma and the infinite product expansion of the generating function of a generalized Thue-Morse sequence to prove a necessary-sufficient condition for the non-periodicity of the generalized Thue-Morse sequence. Furthermore, we prove that if the generalized Thue-Morse sequence is not periodic,  then no subsequence $(a(N+nl))_{n=0}^\infty$ ( for all $N \ge 0$ and for all $l &gt;0$) of the generalized Thue-Morse sequences is periodic. In Section \ref{s:4}, we introduce the concept of the stammering sequence, introduced by Adamczewski, Bugeaud, and Luca \cite{ABL}, and the combinatorial transcendence criterion, established by Adamczewski, Bugeaud, Luca \cite{ABL} and Bugeaud \cite{Bu1}. By applying this combinatorial transcendence criterion to the generalized non-periodic Thue-Morse sequence $(a(n))_{n=0}^\infty$, which takes its values from $\{0,1,\ldots,\beta-1\}$, we show that $\sum_{n=0}^\infty a(N+nl){\beta}^{-n-1}$ is a transcendental number. Furthermore by applying this combinatorial transcendence criterion to the generalized non-periodic Thue-Morse sequence $(a(n))_{n=0}^\infty$, which takes its values in bounded positive integers, we show that the continued fraction $[0, a(N), a(N+l),\ldots,a(N+nl ), \ldots]$ is also transcendental number. This result includes Theorem \ref{th.1.2}. In Section \ref{s:5}, we consider the necessary-sufficient condition that a generalized Thue-Morse sequence is a $k$-automatic sequence.  Then we find many transcendental numbers whose irrationality exponent is finite in all arithmetical subsequences of the corresponding generalized Thue-Morse sequence by applying the Adamczewski and Cassaigne result on $k$-automatic irrational numbers \cite{AC}. Furthermore, we consider the transcendence of the value at the algebraic point of the generating function $\sum_{n=0}^\infty a(N+nl)z^{-n-1}$ by applying Becker's result on $k$-automatic power series.





\section{Generalized Thue-Morse sequences and their generating functions}\label{s:2}

Let $(a(n))_{n=0}^\infty$ be a sequence with values in $\mathbb{C}$.
The sequence $(a(n))_{n=0}^\infty$ is called {\it ultimately periodic}
if there exist non-negative integers $N$ and $l&gt;0$ such that 
\begin{align}\label{eq2.1}
    a(n)=a(n+l)  \qquad (\forall n \ge N). 
\end{align}
An $arithmetical$  $subsequence$ of $(a(n))_{n=0}^\infty$ is defined to be a subsequence such as $(a(N+tl))_{t=0}^\infty$, where $N \ge 0$ and  $l &gt;0$. 
\begin{definition}\label{de.2.1}
Let $(a(n))_{n=0}^\infty$ be a sequence with values in $\mathbb{C}$. The sequence $(a(n))_{n=0}^\infty$ is called  $everywhere$ $non$-$periodic$ if no arithmetical  subsequence of $(a(n))_{n=0}^\infty$ takes on only one value.
\end{definition}

Now we present some lemmas about the everywhere non-periodic sequences.
\begin{lemma}\label{Le.2.1}
If $(a(n))_{n=0}^\infty$ is everywhere non-periodic, then $(a(n))_{n=0}^\infty$ is not ultimately periodic.
\end{lemma}

\begin{proof}
We  prove the contrapositive. Assume that $(a(n))_{n=0}^\infty$ is ultimately periodic. From the definition of everywhere non-periodic, there exist non-negative integers $N$ and $l&gt;0$ such that 
\begin{align}\label{eq2.2}
            a(n)=a(n+l)   \qquad (\forall n \ge N). 
\end{align}
It follows from \eqref{eq2.2} that the arithmetical subsequence $(a(N+tl))_{t=0}^\infty$ takes on only one value.
\end{proof}

\begin{lemma}\label{Le.2.2}
If $(a(n))_{n=0}^\infty$ is everywhere non-periodic, then all arithmetical subsequences of $(a(n))_{n=0}^\infty$ are everywhere non-periodic.
\end{lemma}
\begin{proof}
We prove contraposition. If $(a(N+tl))_{t=0}^\infty$ is not everywhere non-periodic, then there exist non-negative integers $k$ and $J&gt;0$ such that $(a(N+kl+mJl))_{m=0}^\infty$ takes on only one value. The subsequence $(a(N+kl+mJl))_{m=0}^\infty$ is also an arithmetical subsequence of $(a(n))_{n=0}^\infty$. Therefore, $(a(n))_{n=0}^\infty$ is not everywhere non-periodic.
\end{proof}

\begin{corollary}\label{Co.2.1}
$(a(n))_{n=0}^\infty$ is everywhere non-periodic if and only if no arithmetical subsequence of $(a(n))_{n=0}^\infty$ is ultimately periodic.
\end{corollary}
\begin{proof}
Assume $(a(n))_{n=0}^\infty$ is everywhere non-periodic. By Lemma \ref{Le.2.1} and Lemma \ref{Le.2.2}, no arithmetical subsequence of the sequence $(a(n))_{n=0}^\infty$ is periodic. 


 We show the sufficient condition. Assume $(a(n))_{n=0}^\infty$ is not everywhere non-periodic. Then there exist non-negative integers $N$ and $l&gt;0$ such that $(a(N+tl))_{t=0}^\infty$ takes on only one value. This sequence is ultimately periodic.
\end{proof}

Next, we generalize the Thue-Morse sequence of Emmanuel \cite{Emma}.
\begin{definition}\label{de.2.2}
Let $L$ be an integer  greater than $1$, and let $a_0,a_1, \ldots ,a_{L-1}$ be $L$ distinct complex numbers. We let ${\{a_0,a_1 \ldots a_{L-1}\}}^*$ denote the free monoid generated by $\{a_0,a_1 \ldots a_{L-1}\}$. We define a morphism $f$ from ${\{a_0,a_1 \ldots a_{L-1}\}}^*$ to ${\{a_0,a_1 \ldots a_{L-1}\}}^*$ as follows:
\begin{align}\label{eq2.3}
f(a_i) = a_{i+1},
\end{align}
where the index $i$ is computed modulo $L$. Let $f^j$ be the $j$ times composed mapping of $f$, and let $f^0$ be the identity mapping. Let $A$ and $B$ be two finite words on $\{a_0,a_1, \ldots ,a_{L-1}\}$, and let $AB$ denote the concatenation of $A$ and $B$.


 Let $A_0=a_0$, $k$ be an integer greater than $1$, and let $\kappa$ be a map $\kappa$:$\{1, \ldots  ,k-1\} \times\mathbb{N} \rightarrow\ \{0, \ldots ,L-1\}$. For a non-negative integer $m$, we define a space of words $W_m$ by
\begin{align}\label{eq2.4}
W_{m}:=\{ a_{i_1} a_{i_2} \ldots a_{i_m} \; | a_{i_1}, a_{i_2}, \cdots ,a_{i_m}\in \{ a_0,a_1, \ldots , a_{L-1}\} \} .
\end{align}
We define $A_{n+1}\in W_{k^{n+1}}$ recursively as
\begin{align}\label{eq2.5}
     A_{n+1}:=A_n f^{\kappa(1,n)}(A_n)\cdots \cdots f^{\kappa (k-1,n)}(A_n),
\end{align}
and we let
\begin{align}\label{eq2.6}
 A_{\infty}:=\lim_{n \to \infty} A_n 
\end{align}
denote the limit of $A_n$.
The sequence (or infinite word) $A_{\infty}$ is called the $generalized$ $Thue$-$Morse$ $sequence$ $of$ $type$ $(L,k,\kappa)$,
abbreviated as the $(L,k,\kappa)$-TM sequence.
\end{definition}
\begin{example}[ \cite{Emma}]\label{exa1}  
Let $L=2$, $a_0=0$, $a_1=1$ and $\kappa(1,y)=1$ for all $y\in \mathbb{N}$. The $(2,2,1)$-TM sequence is as follows:
\begin{align*}
         &amp;\qquad \qquad A_0=0,\; A_1=01,\;  A_2=0110,\;   A_3=01101001,\\
         &amp; A_{\infty}=0110100110010110100101100110100110010110011010010110100110\cdots.
\end{align*}
This example is the Thue-Morse sequence of Emmanuel \cite{Emma}.
\end{example}
\begin{example}\label{exa2}
Let $L=2$, $a_0=0$, $a_1=1$ and
\[
   \kappa (1, y)= \begin{cases}
    1, &amp; \text{ $y$ is a prime number};\\
     0, &amp; \text{ otherwise}.
  \end{cases}
\]
The $(2,2, \kappa)$-TM sequence is
\begin{align*}
         &amp;A_0=0,\; A_1=00,\;  A_2=0000,\;   A_3=00001111,\\
         &amp; A_{\infty}=0000111100001111 1111000011110000\cdots.
\end{align*}
\end{example}  
\begin{example}\label{exa3}  
Let $L=2$, $a_0=0$, $a_1=1$ and
\[
   \kappa (1, y)= \begin{cases}
    1, &amp; \text{ $y$ is a square number and $s=2$};\\
     0, &amp;  \text{ otherwise}
  \end{cases}.
\]
The $(2,3,\kappa)$-TM sequence is
\begin{align*}
         &amp;\qquad \qquad A_0=0,\; A_1=001,\;  A_2=001001001,\\
         &amp; A_{\infty}=001001001001001001001001001 001001001001001001001001001 110110\cdots.
\end{align*} 
\end{example} 

Let $(a(n))_{n=0}^\infty$ be a sequence with values in $\mathbb{C}$. The $generating$ $function$ of $(a(n))_{n=0}^\infty$ is the formal power series $g(z) \in \mathbb{C}[[z]]$, defined as 
\[
g(z):=\sum_{n=0}^\infty a(n) z^n. 
\]

The following lemma clarifies the meaning of an $(L,k,\kappa)$-TM sequence.
\begin{lemma}\label{Le.2.3}
Let $A_{\infty}=(b(n))_{n=0}^\infty$ be a $(L,k,\kappa)$-TM sequence with $a_j=\exp \frac{2\pi \sqrt{-1} j}{L}$ $($ for all $j$ with $0\le \; j \le L-1$ $)$. Let $ G_{A_{\infty}}(z)$ be the generating function of $(b(n))_{n=0}^\infty$,
\[
 G_{A_{\infty}}(z):=\sum_{n=0}^\infty b(n) z^n. 
\]
The generating function $G_{A_{\infty}}(z)$ will have the infinite product on $|z|&lt;1$,
\begin{align}\label{eq2.7}
      G_{A_{\infty}}(z)=\prod_{y=0}^\infty (1+\sum_{s=1}^{k-1}\exp \frac{2\pi \sqrt{-1} \kappa(s,y) } {L}z^{s k^y}).   
\end{align}
\end{lemma}
\begin{proof}
From the assumption $a_j=\exp \frac{2\pi \sqrt{-1} j}{L}$ for all $j$ with $0\le \; j \le L-1$, we have
\begin{align} \label{eq2.8}
f(a_j)=\exp \frac{2\pi \sqrt{-1} }{L} a_j
\end{align}
for all $j$ with $0\le \; j \le L-1$. The $(L,k,\kappa)$-TM sequence takes on only finite values, and by the Cauchy-Hadamard theorem, $G_{A_{\infty}}(z)$ and $\prod_{y=0}^\infty(1+\sum_{s=1}^{k-1}\exp \frac{2\pi \sqrt{-1} \kappa(s,y) } {L}z^{s k^y})$ converge absolutely on the unit disk. Let $G_{A_n}(z)$ be the generating function of $A_n$; We identify the infinite word $A_n 0\cdots0\cdots=:A_n 0^{\infty}$ with $A_n$.


We will show by induction that the following equality holds for $n$,
\begin{align}\label{eq2.9}
         G_{A_n}(z)=\prod_{y=0}^{n-1}(1+\sum_{s=1}^{k-1}\exp \frac{2\pi \sqrt{-1} \kappa(s,y)}{L}z^{s k^y}).  
\end{align} 
First, we check the case $n=1$. From the definition of $A_1$, we have
\begin{align}\label{eq2.10}
G_{A_1}(z)=1+\sum_{s=1}^{k-1}\exp \frac{2\pi \sqrt{-1} \kappa(s,0)}{L}z^s.
\end{align}
Thus, the $n=1$ case is true. By the induction hypothesis we may assume that
\begin{align}\label{eq2.11}
             G_{A_j}(z)=\prod_{y=0}^{j-1}(1+\sum_{s=1}^{k-1}\exp \frac{2\pi \sqrt{-1} \kappa(s,y)}{L}z^{s k^y}).
\end{align}
Therefore, we have
\begin{align}\label{eq2.12}
            G_{A_{j+1}}(z)=G_{A_j}(z)+\sum_{s=1}^{k-1} G_{f^{\kappa(s,j)}(A_j)}(z)z^{s k^j}.
\end{align}
Alternatively,
\begin{align}\label{eq2.13}
G_{f^{\kappa(s,j)}(A_j)}(z)=\exp \frac{2\pi \sqrt{-1} \kappa(s,j)}{L}G_{A_j}(z).
\end{align}
From \eqref{eq2.11}-\eqref{eq2.13}, we get
\begin{align}\label{eq2.14}
          &amp;G_{A_{j+1}}(z)=G_{A_j}(z)(1+\sum_{s=1}^{k-1}\exp \frac{2\pi \sqrt{-1} \kappa(s,y)}{L}z^{s k^j})\nonumber \\
&amp;\qquad\qquad =\prod_{y=0}^j(1+\sum_{s=1}^{k-1}\exp \frac{2\pi \sqrt{-1} \kappa(s,y)}{L}z^{s k^y}).
\end{align}
Therefore \eqref{eq2.7} is true. Finally, we will compare the coefficients of $z^j$ on both sides of \eqref{eq2.7}. On the right-hand side of \eqref{eq2.7}, the coefficient of $z^j$ are determined by $G_{A_N}(z)$ for sufficiently large $N$. From the definition of $A_{\infty}$, the prefix word,  $p^N$, of $A_{\infty}$ is $A_N$. From the above argument and \eqref{eq2.9}, the coefficients of $z^j$ on both sides of \eqref{eq2.7} must coincide.
\end{proof}

\begin{proposition}\label{p.2.1}
Let $A_{\infty}=(b(n))_{n=0}^\infty$ be a $(L,k,\kappa)$-TM sequence with $a_j=\exp \frac{2\pi \sqrt{-1} j}{L}$ $($for all $j$ with $0\le \; j \le L-1$ $)$. Let $(a(n))_{n=0}^\infty$ be a sequence defined by \eqref{eq1.5}. Then 
\begin{align}\label{eq2.15}
\frac{L}{2\pi \sqrt{-1}} \log b(n)\equiv a(n) \; \pmod{L}.
\end{align}
\end{proposition}
\begin{proof}
Let the $k$-adic expansion of $n$ be as follows:  
\begin{align}\label{eq2.16}
n=\sum_{q=1}^{n(k)} s_{n,q} k^{w_n(q)},
\end{align}
 where  $1\le s_{n,q}\le k-1$, $0 \le w_n(q)&lt;w_n(q+1)$. By uniqueness of the $k$-adic expansion and Lemma \ref{Le.2.3}, we have
 \begin{eqnarray}\label{eq2.17}
&amp;b(n)=\prod_{q=1}^{n(k)} \exp \frac{2\pi \sqrt{-1} \kappa (s_{n,q},w_n(q))}{L}\nonumber \\&amp;
\qquad=\exp \frac{2\pi \sqrt{-1} (\sum_{q=1}^{n(k)}\kappa (s_{n,q},w_n(q)))}{L}\nonumber \\
&amp;\;\;\;\;\;\;\qquad\qquad =\exp \frac{2\pi \sqrt{-1} (\sum_{q=1}^{n(k)}\kappa (s_{n,q},w_n(q))\pmod{L})}{L}.
\end{eqnarray}
By \eqref{eq2.16}, \eqref{eq2.17} and the definition of  $a(n)$, the equality \eqref{eq2.15} is obtained.
\end{proof}

Now we give other representations of Example \ref{exa2} and Example \ref{exa3} by using Proposition \ref{p.2.1}.


We begin with Example \ref{exa2}. Let the $2$-adic expansion of non-negative integer $n$ be
\begin{align}\label{eq2.18}
n=\sum_{q=1}^{{\rm finite}}  2^{w_n(q)},
\end{align}
where $ 0\le w_n(q) &lt;w_n(q+1)$. We define the number $A(n)$ to be
\[
A(n)=\# \text{\{ $w_n(q)$ $|$ $w_n(q)$ is a prime number \}},
\]
and we define $(a(n))_{n=0}^\infty$ as
\begin{align}\label{eq2.19}
   a(n )= \begin{cases}
    1, &amp; A(n)\equiv 1 \pmod{2};\\
     0, &amp; A(n)\equiv 0 \pmod{2},
  \end{cases}
\end{align}
e.g., $a(44)=a(2^2+2^3+2^5)=1$, $a(12)=a(2^2+2^3)=0$). The sequence $(a(n))_{n=0}^\infty$ is the generalized Thue-Morse sequence of type $(2,2,\kappa)$ with
\[
   \kappa (1, y)= \begin{cases}
    1, &amp;  \text{$y$ is a prime number};\\
     0, &amp; \text{otherwise}.
  \end{cases}
\]

Next, we give another representation of Example \ref{exa3}. Let the $3$-adic expansion of non-negative integer $n$ be
\begin{align}\label{eq2.20}
n=\sum_{q=1}^{{\rm finite}}  s_{n,q} 3^{w_n(q)},
\end{align}
where $1\le s_{n,q}\le 2,  0\le w_n(q) &lt;w_n(q+1)$. We define the number $B(n)$ as
\[
B(n)=\# \text{\{ $w_n(q)$ $|$ $w_n(q)$ is a square number and $s_{n,q}=2$ \}}, 
\]
and we define $(a(n))_{n=0}^\infty$ as
\begin{align}\label{eq2.21}
   a(n )= \begin{cases}
    1, &amp; B(n)\equiv 1 \pmod{2};\\
     0, &amp; B(n)\equiv 0 \pmod{2},
  \end{cases}
\end{align}
e.g., $a(169)=a(1+2\times3+2\times3^4)=0$, $a(7)=a(1+2\times3)=1$). The sequence $(a(n))_{n=0}^\infty$ is the generalized Thue-Morse sequence of type $(2,3,\kappa)$ with
\[
   \kappa (s, y)= \begin{cases}
    1 &amp; \text{$y$  is a square number and $s=2$};\\
     0 &amp; \text{otherwise}.
  \end{cases}
\]
\section{Necessary-sufficient condition for the non-periodicity of a generalized Thue-Morse sequence}
\label{s:3}

We begin by presenting the following key lemma about the $k$-adic expansion of non-negative integers.

\begin{lemma}\label{Le.3.1}
If $k&gt;1$ and $l&gt;0$ be integers and $t$ be a non-negative integer, then there exists an integer $x$ such that
\begin{align}\label{eq3.1}
xl=\sum_{q=1}^{{\rm finite}}  s_{xl,q} k^{w_{xl}(q)},
\end{align}
where $s_{{xl},1}=1, w_{xl}(2)-w_{xl}(1)&gt;t,w_{xl}(q+1)&gt;w_{xl}(q)\ge 0$.


Furthermore, if $t'$ be other non-negative integer, then there exists an integer $X$ such that
\begin{align}\label{eq3.2}
Xl=\sum_{q=1}^{{\rm finite}}  s_{Xl,q} k^{w_Xl(q)},
\end{align}
where $s_{{Xl},1}=1, w_{Xl}(2)-w_{Xl}(1)&gt;t', w_{Xl}(q+1)&gt;w_{Xl}(q)\ge 0, w_{xl}(1)=w_{Xl}(1)$.
\end{lemma}
\begin{proof}
Let us assume the factorization of $k$ into prime factors is
\begin{align}\label{eq3.3}
k=\prod_{t=1}^N {p_t}^{y_t},
\end{align}
where $p_1,p_2,\cdots p_N$ are  $N$ distinct prime numbers and $y_t$\;for $p_t$ $\;(1\le t \le N\;)$ are $N$ positive integers. Let $l$ be represented as
\begin{align}\label{eq3.4}
l=G\prod_{u=1}^n {p_{t_u}}^{x_u},
\end{align}
where $G$ and $k$ are coprime, ${p_{t_u}} \in \{p_t|1\le t \le N\}$ and $x_u$ are $n$ positive integers. As $G$ and $k$ are coprime, there exist integers $D$ and $E$ such that
\begin{align}\label{eq3.5}
DG=1-k^{t+1}E.
\end{align}
We set $$F= \max  \{A  |  x_u=y_{t_u} A  +H,  \;  0 \leq H  &lt; y_{t_u},   \; 1 \leq u  \leq n \}.$$ From the definition of $F$, $k^{F+1}  \prod_{u=1}^n {p_{t_u}}^{-x_u}$ is a non-negative integer. Thus we have
\begin{align}\label{eq3.6}
lD^2G k^{F+1} \prod_{u=1}^n {p_{t_u}}^{-x_u}=k^{F+1} D^2G^2.
\end{align}
On the other hand, by \eqref{eq3.5} we have
\begin{align}\label{eq3.7}
D^2G^2=1+k^{t+1}E(k^{t+1}E-2).
\end{align}
Thus $E(k^{t+1}E-2)$ is a non-negative integer. If $E(k^{t+1}E-2)&gt;0$, it follows from the $k$-adic expansion of $E(k^{t+1}E-2)$ that $k^{F+1}D^2G^2$ satisfies the Lemma. If $E(k^{t+1}E-2)=0$, then $G=1$. The integer $k^{F+1}(1+k^{t+1})$ also satisfies the Lemma.
As $F+1$ is independent of $t$, the second claim is trivial.
\end{proof}

Now we will show the everywhere non-periodic result by the previous lemma.  
\begin{proposition}\label{p.3.1}
Let $A_{\infty}=(a(n))_{n=0}^\infty$ be a sequence with values in $\mathbb{C}$, and let $G_{A_{\infty}}(z)$ denote the generating function of $(a(n))_{n=0}^\infty$. Assume that $G_{A_{\infty}}(z)$ has the following infinite product expansion for an integer $k$ greater than $1$ and $t_{s,y} \neq0$ for all $s$ with $1\le  s\le k-1$ and for all $y\in\mathbb{N}$,
\begin{align}\label{eq3.8}
G_{A_{\infty}}(z)=\prod_{y=0}^\infty (1+\sum_{s=1}^{k-1} t_{s,y} z^{s k^y}).
\end{align}
If there exists a periodic arithmetical subsequence of $(a(n))_{n=0}^\infty$, then $G_{A_{\infty}}(z)$ has the following infinite product expansion
\begin{align}\label{eq3.9}
G_{A_{\infty}}(z)=(\sum_{n=0}^{k^A -1} a(n) z^n) \prod_{y=0}^\infty(1+\sum_{s=1}^{k-1} h^{s k^y} z^{s k^{A+y}}),
\end{align}
where $A$ is a non-negative integer and $h$ is a complex number.
\end{proposition}
\begin{proof}
Let $n$ and $m$ be two non-negative integers and their respective $k$-adic expansions are as follows:
\begin{align}\label{eq3.10}
n=\sum_{q}^{{\rm finite}} s_{n,q} k^{w_n(q)}, \quad m=\sum_{p}^{{\rm finite}} s_{m,p} k^{w_m(p)},
\end{align}
where $1\le s_{n,q}, s_{m,p}\le k-1$, $ 0\le w_n(q) &lt;w_n(q+1)$, and $0\le w_m(p)&lt;w_m(p+1)$.
If $w_n(q)\neq w_n(p)$ for all pairs $(q,p)$, then
\begin{align}\label{eq3.11}
a(n+m)=a(n)a(m)
\end{align}
by the assumption of $G_{A_{\infty}}(z)$ and the uniqueness of the $k$-adic expansion of non-negative integers. If $(a(n))_{n=0}^\infty$ has a periodic arithmetical subsequence, then by Corollary \ref{Co.2.1} $(a(n))_{n=0}^\infty$ is not everywhere non-periodic. Thus there exist two non-negative integers, $N$ and $l&gt;0$, such that
\begin{align}\label{eq3.12}
 a(N)=a(N+tl)  \qquad   (\forall  t \in \mathbb{N}).
 \end{align}
Let the $k$-adic expansion of $N$ be 
\begin{align}\label{eq3.13}
N=\sum_{q=1}^{N(k)} s_{N,q} k^{w_N(q)}   \qquad where\;  1\le s_{N,q}\le k-1, 0 \le w_N(q)&lt;w_N(q+1).
\end{align}
By the assumption of $G_{A_{\infty}}(z)$ and \eqref{eq3.11}, we have
\begin{align}\label{eq3.14}   
        &amp;a(N)=a(N+k^r t l)=a(N)a(k^r t l) \qquad (\forall  r &gt; w_N(N(k))).
        \\&amp;\label{eq3.15}\qquad   \qquad  \qquad    \qquad a(N) \neq 0.
\end{align}        
From \eqref{eq3.14} and \eqref{eq3.15}, we get
\begin{align}\label{eq3.16}
         a(k^r t l) = 1\qquad (\forall  r &gt; w_N(N(k))).
\end{align}
By Lemma \ref{Le.3.1}, there exists an integer $x$ greater than zero such that
\begin{align}\label{eq3.17}
x l=\sum_{q=1}^{x l(k)} s_{xl,q} k^{w_{xl}(q)},
\end{align}
where $s_{xl,1}=1$ and $w_{xl}(2)-w_{xl}(1)&gt;1$.


Moreover, there exists an integer $X$ greater than zero such that
\begin{align}\label{eq3.18}
X l=\sum_{q=1}^{X l(k)} s_{{Xl}_q} k^{w_{Xl}(q)},
\end{align}
where $s_{Xl,1}=1$, $w_{Xl}(2)-w_{Xl}(1)&gt;w_{xl}(xl(k))$ and $w_{Xl}(1)=w_{xl}(1)$.


Let $xl k^{-w_{xl}(1)}$ and $Xl k^{-w_{xl}(1)}$ be replaced by $xl$ and $Xl$, respectively. Let  $r$ be an integer greater than $w(N(k))+w_{xl}(1)$ and $s$ be an integer in $\{1,\ldots, k-1\}$.


By the definition of $Xl$ and \eqref{eq3.11}, we have
\begin{align}\label{eq3.19}
a(k^r sX l)=a(sk^r )a(k^rsXl-sk^r).
\end{align}
From \eqref{eq3.15}, we get
\begin{align}\label{eq3.20}
&amp;1=a(k^r x l),
\\&amp;\label{eq3.21}1=a(k^r sX l),
\\&amp;\label{eq3.22}1=a(k^r x l+k^r sX l).
\end{align}
By \eqref{eq3.11}, \eqref{eq3.19}-\eqref{eq3.22} and the definitions of $xl$ and $Xl$, we have
\begin{align}\label{eq3.23}
    &amp;a(k^r)a(k^r x l-k^r)=1,
    \\&amp; \label{eq3.24}a(lsk^r)a(sX lk^r-s k^r)=1,
     \\&amp; \label{eq3.25}a(k^r (s+1))a(x l k^r-k^r)a(sX lk^r-s k^r)=1.
\end{align}
From \eqref{eq3.23}-\eqref{eq3.25}, we get
\begin{align}\label{eq3.26}
a(k^r (s+1))=a(k^r)a(k^r s).
\end{align}
Put $h:=a(k^{w(N(k))+w_{xl}(1)+1})$.


By \eqref{eq3.11}, we have
\begin{align}\label{eq3.27}
a(sk^y)=t_{s,y},
\end{align}
 for all $s$ with $1\le  s\le k-1$ and for all $y \in \mathbb{N}$.


By \eqref{eq3.15}, \eqref{eq3.26}, \eqref{eq3.27} and inductive computation, we get the relations
\begin{align}\label{eq3.28}
t_{s,w(N(k))+w_{xl}(1)+1+y}=h^{s k^y},
\end{align}
for all $s$ with $1\le  s\le k-1$ and for all $y \in \mathbb{N}$. From the assumption of $G_{A_{\infty}}(z)$, the proof is complete.
\end{proof}

\qquad Finally, we prove the main theorem in Section \ref{s:3}.
\begin{theorem}\label{th.3.1}
Let $A_{\infty}=(a(n))_{n=0}^\infty$ be an $(L,k,\kappa)$-TM sequence. The sequence $A_{\infty}=(a(n))_{n=0}^\infty$ is ultimately periodic if and only if there exists an integer $A$ such that
\begin{align}\label{eq3.29}
\kappa(s,A+y) \equiv \kappa(1,A) s k^y    \pmod{L},
\end{align}
 for all $s$ with $1\le  s\le k-1$ and for all $ y \in \mathbb{N}$.


Moreover, if the $(L,k,\kappa)$-TM sequence is not ultimately periodic, then no arithmetical subsequence of $(L,k,\kappa)$-TM sequence is ultimately periodic.
\end{theorem}
\begin{proof}
We assume, without loss of generality, that $A_{\infty}=(a(n))_{n=0}^\infty$ is an $(L,k,\kappa)$-TM sequence with $a_j=\exp \frac{2\pi \sqrt{-1} j}{L}$ $($for all $0\le j \le L-1$ $)$. From this assumption and Lemma \ref{Le.2.3}, $(a(n))_{n=0}^\infty$ satisfies the assumption of Proposition \ref{p.3.1}. Therefore, \eqref{eq3.29} is the necessary condition.


 Now, we show the sufficient condition. Let $G_{A_{\infty}}(z)$ be the generating function of $(a(n))_{n=0}^\infty$. Notation is the same as for Proposition \ref{p.3.1}. If we assume that $(a(n))_{n=0}^\infty$ satisfies \eqref{eq3.29}, then there exists a non-negative integer $A$ such that 
\begin{align}\label{eq3.30}
t_{s,A+y}=h^{s k^y}  \qquad (\forall y \in \mathbb{N}).  
\end{align}
Thus $G_{A_{\infty}}(z)$ has the infinite product expansion
\begin{align}\label{eq3.31}
G_{A_{\infty}}(z)=(\sum_{n=0}^{k^A -1} b(n) z^n) \prod_{y=0}^\infty(1+\sum_{s=1}^{k-1} (h z^{k^A})^{s k^y}).
\end{align}
Let $Z=h z^{k^A}$. As $h$ is the $L$-th root of $1$ and $\kappa$ is a zero map in Lemma \ref{Le.2.3}, we find
\begin{align}\label{eq3.32} 
             \prod_{y=0}^\infty(1+\sum_{s=1}^{k-1} Z^{s k^y})=\sum_{n=0}^\infty Z^n  \qquad on \; |Z|&lt;1.
\end{align}
We put $G(z)=\sum_{n=0}^{k^A -1} a(n) z^n$. From \eqref{eq3.31} and \eqref{eq3.32},
\begin{align}\label{eq3.33}
              G_{A_{\infty}}(z)=G(z)(\sum_{n=0}^\infty (h z^{k^A})^n). 
\end{align}
As $h$ is the $L$-th root of $1$,
\begin{align}\label{eq3.34}
              G_{A_{\infty}}(z)=(G(z) (\sum_{n=0}^{L-1} (h z^{k^A})^n))(1+\sum_{s=1}^\infty z^{s L k^A})=\frac{G(z) (\sum_{n=0}^{L-1} (h z^{k^A})^n)}{1-z^{L k^A}}.
\end{align}
As the degree of $G(z)$ is $k^A -1$, and using \eqref{eq3.34}, we find that the sequence  $(a(n))_{n=0}^\infty$ that satisfies \eqref{eq3.29} has a period $Lk^A$. Moreover, if the $(L,k,\kappa)$-TM sequence is not ultimately periodic, then no arithmetical sequence of $(L,k,\kappa)$-TM sequence is ultimately periodic by the above argument and by Proposition \ref{p.3.1}.
\end{proof}

If an $(L,k,\kappa)$-TM sequence satisfies
\begin{align}\label{eq3.35}
     \kappa (s,y)=\kappa (s,y+1)
\end{align} 
for all $s$ with $1\le  s\le k-1$ and for all $ y \in \mathbb{N}$, then $(\kappa(1),\kappa(2),\ldots ,\kappa(k-1))$-$L$ will denote the $(L,k,\kappa)$-TM sequence. 

The weak version of the corollary that follows is given as Theorem $2$ in Morton and Mourant \cite{MM}. See also Allouche and Shallit \cite{AllSha2}, Frid \cite{Fr}.
\begin{corollary}\label{Co.3.1}
The sequence $(\kappa(1),\kappa(2),\ldots ,\kappa(k-1))$-$L$ is periodic if and only if 
  $\kappa(s)$ $($ for all $s$ with $1\le  s\le k-1$ $)$ satisfies
\begin{align}\label{eq3.36}
             s \kappa(1) \equiv \kappa(s) ,\kappa(k-1)\equiv 0 \pmod{L}.
\end{align}
Moreover, if $(\kappa(1),\kappa(2),\ldots ,\kappa(k-1))$-$L$ is not periodic, then no arithmetical subsequence of $(\kappa(1),\kappa(2),\ldots ,\kappa(k-1))-L$ is periodic.
\end{corollary}
\begin{proof}
By Theorem \ref{th.3.1}, the necessary-sufficient condition for the periodicity of


$(\kappa(1),\kappa(2),\ldots ,\kappa(k-1))$-$L$ comprises the following relations:
\begin{align}\label{eq3.37}
             \kappa(1,A+1)     \equiv \kappa(1,A)k   \pmod{L},
             \kappa(k-1)\equiv(k-1)\kappa(1) \equiv 0 \pmod{L}.
\end{align}
.
\end{proof}

\section{Transcendence results of the generalized Thue-Morse sequences}\label{s:4}

Adamczewski, Bugeaud, and Luca \cite{ABL} introduced a new class of sequences, as follows.
For any positive number $y$,$\lfloor y\rfloor $ and $\lceil y\rceil $ are the floor and ceiling functions. Let $W$ be a finite word on $\{a_0,a_1, \ldots, a_{L-1}\}$ and let $|W|$ be the length of $W$. For any positive number $x$, we let $W^x$ defined the word $W^{ \lfloor x \rfloor} W^`$, where $W^`$ is a prefix of $W$ of length $\lceil(x-\lfloor x\rfloor)|W|\rceil$. 
\begin{definition}\label{de.4.1}
$(a(n))_{n=0}^\infty$ is called a $stammering$ $sequence$ if $(a(n))_{n=0}^\infty$ satisfies the following conditions:

$(1)$ The sequence $(a(n))_{n=0}^\infty$ is a non-periodic sequence.


$(2)$ There exist two sequences of finite words, $(U_m)_{m\ge 1}$ and $(V_m)_{m\ge 1}$, such that,


$(A)$ there exists a real number $w &gt;1$ independent of $n$ such that the word \qquad \qquad \qquad\qquad $U_m {V_m}^w$ is a prefix of the word $(a(n))_{n=0}^\infty$,


$(B)$ $\lim_{m \to \infty} |U_m|/|V_m|\;&lt; \;+\infty$, and

$(C)$  $\lim_{m \to \infty} |V_m|=+\infty$.
\end{definition}
Let $(a(n))_{n=0}^\infty$ be a sequence of positive integers. We define the $continued$ $fraction$ of $(a(n))_{n=0}^\infty$ as
\begin{align}\label{eq4.1}
 [0, a(0),a(1),\ldots, a(n),\ldots ]:=\cfrac{1}{a(0)+
                                                 \cfrac{1}{a(1)+
                                                 \cfrac{1}{\cdots +
                                                 \cfrac{1}{a(n)+
                                                 \cfrac{1}{
                                                 \ddots}}}}}.
\end{align} 
Adamczewski, Bugeaud, Luca \cite{ABL} and Bugeaud \cite{Bu1} proved the result that follows by the Schmidt subspace theorem.
\begin{theorem}[\cite{ABL,Bu1}]\label{ABL-Bu1}
If $\beta$ is an integer greater than $1$ and $(a(n))_{n=0}^\infty$ is a stammering sequence on $\{0,1,\ldots,\beta-1\}$, then $\sum_{n=0}^\infty \frac{a(n)}{ {\beta}^{n+1}}$ is a transcendental number. Moreover, if $(a(n))_{n=0}^\infty$ is a stammering sequence on bounded positive integers, then the continued fraction $[0, a(0), a(1)\ldots,a(n) \ldots]$ is also a transcendental number.
\end{theorem}
We will prove the next theorem using Theorems and \ref{th.1.2}, \ref{th.3.1} and \ref{ABL-Bu1}.
\begin{theorem}\label{th.4.2}
Let $A_{\infty}=(a(n))_{n=0}^\infty$ be an $(L,k,\kappa)$-TM sequence and $\beta$ be an integer greater than $1$. We assume that $(a(n))_{n=0}^\infty$ takes its input from $\{0,1,\ldots,\beta-1\}$. If there is no integer $A$ such that
\begin{align}\label{eq4.2}
\kappa(s,A+y) \equiv \kappa(1,A) s k^y    \pmod{L}
\end{align}
for all $s$ with $1\le  s\le k-1$ and for all $ y \in \mathbb{N}$, then $\sum_{n=0}^\infty \frac{a(N+nl)}{ {\beta}^{n+1}}$ $($ for all $N \ge 0$ and for all $l&gt;0$ $)$ is a transcendental number.


Moreover, if we assume that $(a(n))_{n=0}^\infty$ takes its input from the positive integers, and if there is no integer $A$ such that
\begin{align}\label{eq4.3}
\kappa(s,A+y) \equiv \kappa(1,A) s k^y    \pmod{L}
\end{align}
for all $s$ with $1\le  s\le k-1$ and for all $ y \in \mathbb{N}$, then $[0, a(N), a(N+s),\ldots,a(N+nl) \ldots]$ $($ for all $N \ge 0$ and  for all $l&gt;0$ $)$ is a transcendental number.
\end{theorem}
\begin{proof}
Let $N$ and $l&gt;0$ be positive integers. By Theorem \ref{th.3.1}, $(a(N+nl))_{n=0}^\infty$ is non-periodic. Therefore, we only have to prove that $(L,k,\kappa)$-TM satisfies the condition $(2)$ of Definition \ref{de.4.1}.


We choose an integer $M$ such that $k^M&gt; 2(N+l)$, and assume that $m&gt;M$. As $f$ is a cyclic permutation of order $L$ and by Definition \ref{de.2.2}, the $(Ll+1)k^m$ prefix word of $(a(n))_{n=0}^\infty$ is as follows
\begin{align}\label{eq4.4}
A_{\infty}=(a(n))_{n=0}^\infty =A_m f^{i_1}(A_m) \cdots f^{i_{Ll}}(A_m)\cdots,
\end{align}
where $A_m$ is the $k^m$ prefix word of $(a(n))_{n=0}^\infty$, $i_j (1\le j\le Ll) \in \{0,\dots, L-1 \}$.


By \eqref{eq4.4}, we have
 \begin{align}\label{eq4.5}
f^{i_{tl}}(a(n))=a(n+k^m tl )
\end{align}
for all $0\le n\le k^m-1$ and for all $1\le t\le L$.
 

As $f$ is a cyclic permutation of order $L$, by \eqref{eq4.4}, \eqref{eq4.5} and the Dirichlet schubfachprinzip, we have
\begin{align}\label{eq4.6}
     (a(N+n l))_{n=0}^\infty =W_{1,m} W_{2,m} W_{3,m} W_{2,m} \cdots ,
\end{align}
where $W_{i,m}$ $(i\in\{1,2,3\})$ are finite words such that
\begin{align}\label{eq4.7}
    &amp;|W_{1,m}|\le ((Ll+1)k^m -N)/l +1,
    \\&amp;\label{eq4.8}|W_{2,m}| \ge (k^m-N)/l-1,
     \\&amp; \label{eq4.9}|W_{2,m}|+|W_{3,m}|\le ((Ll+1)k^m -N)/l +1.
\end{align} 


We put $U_m:=W_{1,m}$, $V_m:=W_{2,m}W_{3,m}$ and $w:=1+\frac{1}{2 Ll+3}$.

By \eqref{eq4.7}-\eqref{eq4.9} and the assumption of $m$, we obtain
\begin{eqnarray}\label{eq4.10}
      &amp;\lceil (w-1)|V_m|\rceil  =\lceil \frac{1}{ 2 Ll+3}(|W_{2,m}|+|W_{3,m}|)\rceil  \le \nonumber \\
      &amp;\frac{1}{ 2 Ll+3}((Ll+1)k^m-N+l)/l\le \frac{k^m}{2 l} \; &lt; |W_{2,m}|.
\end{eqnarray}
From \eqref{eq4.10}, $(a(n))_{n=0}^\infty$ satisfies Condition $(A)$.


Furthermore,
\begin{eqnarray}\label{eq4.11}
     &amp;|U_m|/|V_m|=|W_{1,m}|/|W_{2,m}W_{3,m}|\le \nonumber \\
&amp;((Ll+1)k^m-N+l)/l \times l /( k^m-N-l) \le 2 Ll+3.
\end{eqnarray}
From \eqref{eq4.11}, $(a(n))_{n=0}^\infty$ satisfies Condition $(B)$.

It follows directly that $(V_m)_{m\ge 1}$ satisfies Condition $(C)$.
\end{proof}

\begin{corollary}\label{Co.4.1}
Let $(a(n))_{n=0}^\infty$ be an $(L,k,\kappa)$-TM sequence and $\beta$ be an integer greater than $1$. If $(a(n))_{n=0}^\infty$ takes its input from $\{0,1,\ldots,\beta-1\}$ and there is no integer $A$ such that
\begin{align}\label{eq4.12}
\kappa(s,A+y) \equiv \kappa(1,A) s k^y    \pmod{L}
\end{align}
for all $s$ with $1\le  s\le k-1$ and for all $y \in \mathbb{N}$, then the generating function $f(z):=\sum_{n=0}^\infty \frac{a(N+nl)}{ z^{n+1}}$ $($ for all $N \ge 0$ and  for all $l&gt;0$ $)$ is transcendental over $\mathbb{C}(z)$.
\end{corollary}
\begin{proof}
We assume $f(z)$ is algebraic over $\mathbb{C}(z)$. As $f(z)$ is algebraic over $\mathbb{Q}(z)$ if and only if  $f(z)$ is algebraic over $\mathbb{C}(z)$ $($see the Remark in Theorem $1.2$ in Nishioka \cite{Ni} $)$, then $f(z)$ satisfies the equation
\begin{align}\label{eq4.13}
      c_n(z) f^n(z)+c_{n-1}(z)f^{n-1}(z)+ \cdots + c_0(z)=0,
\end{align}
where $c_i(z) \in \mathbb{Q}[z] $  $( 0 \le i \le n)$, $c_n(z) c_0(z) \neq 0$ and $c_i(z)$ $(0 \le i \le n)$ are coprime. From Theorem \ref{th.4.2}, $f(\frac{1}{\beta})$ is a transcendental number. From the above argument and by \eqref{eq4.13}, $c_i(\frac{1}{\beta}) =0$  $($ for all $0 \le i \le n)$. This contradicts the assumption that $c_i(z)$ $( 0 \le i \le n)$ are coprime.
\end{proof}

\section{ $k$-Automatic generalized Thue-Morse sequences and some results}\label{s:5}
First, we introduce some definitions.
\begin{definition}\label{de.5.1}
Let $\alpha$ be an irrational real number. The irrationality exponent $\mu (\alpha)$ of  $\alpha$ is the supremum of the real numbers $\mu$ such that the inequality
\begin{align}\label{eq5.1}
    \left| \alpha - \frac{p}{q} \right| &lt; \frac{1}{q^{\mu}}
\end{align}
has infinitely many solutions in non-zero integers $p$ and $q$.
\end{definition}
\begin{definition}\label{de.5.2}
The $k$-$kernel$ of $(a(n))_{n=0}^\infty$ is the set of all subsequences of the form
$(a(k^e n+j))_{n=0}^\infty$, where $e\ge 0$ and $0\le j\le k^e-1$.
\end{definition}
\begin{definition}\label{de.5.3}
The sequence$(a(n))_{n=0}^\infty$ is called a $k$-$automatic$ $sequence$ if the $k$-kernel of  $(a(n))_{n=0}^\infty$
is the finite set.
\end{definition}
\begin{definition}\label{de.5.4}
The power series $\sum_{n=0}^\infty a(n) z^n \in\mathbb{C}[[x]]$ is  called a $k$-$automatic$ $power$ $series$ if
$(a(n))_{n=0}^\infty$ is a $k$-automatic sequence.  
\end{definition}
\begin{definition}\label{de.5.5}
An $(L,k,\kappa)$-TM sequence is called $y$-$periodic$ if there  exist  non-negative integers $N$ and $t(0&lt;t)$ such that 
\begin{align}\label{eq5.2}
     \kappa (s,y)=\kappa (s,y+t),
\end{align} 
 for all $s$ with $1\le  s\le k-1$ and for all $y \ge N$.
\end{definition}

Now we introduce two results.
\begin{theorem} [\cite{AC}]\label{th.5.1}
If $\beta$ is an integer greater than $1$ and $(a(n))_{n=0}^\infty$ is a non-periodic $k$-automatic sequence on $\{0,1,\ldots,\beta-1\}$, then $\mu(\sum_{n=0}^\infty \frac{a(n)}{ {\beta}^{n+1}})$ is finite.
\end{theorem}

\begin{theorem} [\cite{Bec}]\label{th.5.2}
If $f(z) \in \mathbb{Q}[[z]]\setminus \mathbb{Q}(z)$ is a $k$-automatic power series and $0&lt;R&lt;1$, then $f(\alpha)$ is transcendental for all but finitely many algebraic numbers $\alpha$ with $|\alpha| \le  R$.
\end{theorem}


Now we consider the necessary-sufficient condition that an $(L,k,\kappa)$-TM sequence is a $k$-automatic sequence.
\begin{proposition}\label{p.5.1}
An $(L,k,\kappa)$-TM sequence is $y$-periodic if and only if it is a $k$-automatic sequence.
\end{proposition}
\begin{proof}
We assume, without loss of generality, that $A_{\infty}=(a(n))_{n=0}^\infty$ is an $(L,k,\kappa)$-TM sequence with $a_j=\exp \frac{2\pi \sqrt{-1} j}{L}$ $($for all $0\le \; j \le L-1$ $)$.


Let us assume that $(a(n))_{n=0}^\infty$ is a $k$-automatic sequence. As the $k$-kernel of  $(a(n))_{n=0}^\infty$ is a finite set, there exist integers $e$ for $0&lt;t $ such that
\begin{align}\label{eq5.3}
        a(k^e n)=a(k^{e+t} n)  \qquad (\forall n \ge 0).
 \end{align}
Let $s$ be any integer in $\{1,2,\ldots,k-1\}$, and let $y$ be any integer in $\mathbb{N}$. By Lemma \ref{Le.2.3} with \eqref{eq3.11} and \eqref{eq5.3}, and substituting $sk^y$ for $n$, we have
\begin{align}\label{eq5.4}
         \exp \frac{2\pi \sqrt{-1}\kappa (s,e+y)} {L}=  a(k^e s k^y )=a(k^{e+t} s k^y) =\exp \frac{2\pi \sqrt{-1}\kappa (s,e+y+t)} {L}.
\end{align}
By the definition of the $(L,k,\kappa)$-TM sequence and \eqref{eq5.4}, $(a(n))_{n=0}^\infty$ is $y$-periodic. 


Now we show the converse. If  an $(L,k,\kappa)$-TM sequence $A_{\infty}=(a(n))_{n=0}^\infty$ is $y$-periodic, then there  exist  non-negative integers $e$ for $0&lt;t $ such that
\begin{align}\label{eq5.5}
      \kappa (s,e+y)=  \kappa (s,e+y+t), 
\end{align}
for all $y$ being any integer in $\mathbb{N}$ and for all $s$ with $1\le s\le k-1$. Let $l$ be any integer greater than $t-1$ and let $(a(k^{e+l} n+j))_{n=0}^\infty$ $($where $0\le j \le k^{e+l}-1$ $)$ be any sequence in the $k$-kernel of  $(a(n))_{n=0}^\infty$.


Therefore, from Lemma \ref{Le.2.3} with \eqref{eq3.11}, we get  
\begin{align}\label{eq5.6}
           a(k^{e+l} n+j)=a(k^{e+l} n)a(j).
\end{align}
As $(a(n))_{n=0}^\infty$ takes on only finitely many values, then $a(j)$ also takes on only finitely many values.


Let the $k$-adic expansion of $n$ be
\begin{align}\label{eq5.7}
          n=\sum_{q=1}^{N(n)} s_{n,q} k^{w(j)} \qquad where \;1\le s_{n,q}\le k-1, w(q+1)&gt;w(q)\ge 0.  
\end{align}
Let $l(t)\equiv l \;\pmod {t}$, where $0\le l(t) \le t-1$. By Lemma \ref{Le.2.3} with \eqref{eq3.11}, we have
\begin{align}\label{eq5.8}
           a(k^{e+l} n)=a(\sum_{q=1}^{N(n)} s_q k^{w(q)+e+l} )=
           \prod_{q=1}^{N(n)}a(s_q k^{w(q)+e+l}).
\end{align}
From \eqref{eq5.7}, \eqref{eq5.8}, and Lemma \ref{Le.2.3} with \eqref{eq3.11}, we get
\begin{align}\label{eq5.9}
           &amp;a(k^{e+l} n)= \prod_{q=1}^{N(n)}a(s_q k^{w(q)+e+l})=
           \prod_{q=1}^{N(n)}a(s_q k^{{w(q)+e+l(t)} })\nonumber \\
           &amp;=a(\sum_{q=1}^{N(n)} s_q k^{w(q)+e+l(t)} )=
           a(k^{e+l(t)} n).
\end{align}
As $a(j)$ takes on only finitely many values, and by \eqref{eq5.6} and \eqref{eq5.9}, it follows that the $k$-kernel of $(a(n))_{n=0}^\infty$ is a finite set.
\end{proof}

\begin{theorem}\label{th.5.3}
Let $(a(n))_{n=0}^\infty$ be an $(L,k,\kappa)$-TM and $\beta$ be an integer greater than $1$. If $(a(n))_{n=0}^\infty$ takes on the values $\{0,1,\ldots,\beta-1\}$, is $y$-periodic and there is no integer $A$ such that
\begin{align}\label{eq5.11}
\kappa(s,A+y) \equiv \kappa(1,A) s k^y    \pmod{L}
\end{align}
for all $s$ with $1\le  s\le k-1$ and for all $y \in \mathbb{N}$, then $\mu(\sum_{n=0}^\infty \frac{a(N+nl)}{ {\beta}^{n+1}})$ $($ for all $N \ge 0$ and  for all $l&gt;0$ $)$ is finite.
\end{theorem}
\begin{proof}
By the previous proposition, $(a(n))_{n=0}^\infty$ is a $k$-automatic sequence. As the arithmetical subsequence of a $k$-automatic sequence is $k$-automatic, see Theorem $2.3$ and Theorem $2.6$ in Allouche and Shallit \cite{AllSha1}, and by Theorems \ref{th.4.2} and \ref{th.5.1}, $\mu(\sum_{n=0}^\infty \frac{a(N+nl)}{ {\beta}^{n+1}})$ is finite.
\end{proof} 

\begin{theorem}
Let $(a(n))_{n=0}^\infty$ be an $(L,k,\kappa)$-TM, $\beta$ be an integer greater than $1$, $f(z):= \sum_{n=0}^\infty \frac{a(N+nl)}{ z^{n+1}}$ $($ for all $N \ge 0$ and for all $l&gt;0$ $)$, and $0&lt;R&lt;1$. If $(a(n))_{n=0}^\infty$ takes on the values $\{0,1,\ldots,\beta-1\}$, is $y$-periodic and there is no integer $A$ such that
\begin{align}\label{eq5.12}
\kappa(s,A+y) \equiv \kappa(1,A) s k^y    \pmod{L}
\end{align}
for all $s$ with $1\le  s\le k-1$ and for all $y \in \mathbb{N}$, then $f(\alpha)$ is a transcendental number for all but finitely many algebraic numbers $\alpha$ with $|\alpha| \le  R$.
\end{theorem}
\begin{proof}
By Corollary \ref{Co.4.1}, $f(z)$ is transcendental over $\mathbb{Q}(z)$. From Proposition \ref{p.5.1}, $(a(N+nl))_{n=0}^\infty$ $($ for all $N \ge 0$ and  for all $l&gt;0$ $)$ is a $k$-automatic sequence. Therefore, $f(z)$ is a $k$-automatic power series. Theorem \ref{th.5.2} implies that $f(\alpha)$ is transcendental for all but finitely many algebraic numbers $\alpha$ with $|\alpha| \le  R$.
\end{proof} 

\section{Acknowledgments}

I would like to thank Dr. Hajime Kaneko for useful advice and
discussions,
Prof. Kimio Ueno for his support, and the members of
the geometric laboratories for their instructive comments.

\begin{thebibliography}{99}
\bibitem{AB1}   B. Adamczewski and Y. Bugeaud, 
On the complexity of algebraic numbers I, {\it Ann. of Math.} {\bf 165} (2007), 547--565.

\bibitem{ABL}   B. Adamczewski, Y. Bugeaud, and F. Luca,
Sur la complexit\'e des nombres alg\'ebriques, {\it C. R. Acad. Sci. Paris} {\bf 339} (2004), 11--14.

\bibitem{AC}   B. Adamczewski and J. Cassaigne,
Diophantine properties of  real numbers generated by finite automata, {\it Compos. Math.} {\bf 142} (2006), 1351--1372.

\bibitem{AllSha1}J.-P. Allouche and J. Shallit,
The ring of $k$-regular sequences,
{\it Theoret. Comput. Sci.} {\bf 98} (1992), 163--197.

\bibitem{AllSha2}J.-P. Allouche and J. Shallit,
Sums of digits, overlaps, and palindromes,
{\it Discrete. Math. Theor. Comput. Sci.} {\bf 4 }(2000), 1--10.

\bibitem{AllSha3}J.-P. Allouche and J. Shallit,
The ring of $k$-regular sequences. II,
{\it Theoret. Comput. Sci.} {\bf 307} (2003), 3--29.

\bibitem{Bec}   P. G. Becker,
$k$-regular power series and Mahler-type functional equations,  {\it J. Number Theory} {\bf 49 }(1994), 269--286.
 
\bibitem{Ber-Ri}   V. Berthe and M. Rigo,
\emph{Combinatorics, Automata and Number Theory}, Encyclopedia of Mathematics and its Applications, Vol.~135, Cambridge University Press 2010.
 
\bibitem  {Bu1} Y. Bugeaud,
Automatic continued fractions are transcendental or quadratic, {\it
Ann. Sci. \'Ec. Norm. Sup\'er} {\bf 46} (2013), 1005--1022.

\bibitem  {Bu2} Y. Bugeaud, \emph{Distribution modulo one and
Diophantine approximation}, Cambridge Tracts in Mathematics, Vol.~193,
Cambridge University Press, 2012.

\bibitem{Emma}  F. Emmanuel,
An analogue of the Thue-Morse sequence,  
 {\it Electron. J Combin} {\bf 14} (2007), paper \#R30.  Available
 at \\
 \url{http://www.combinatorics.org/ojs/index.php/eljc/article/view/v14i1r30}.

\bibitem{Fo} N. P. Fogg,
\emph{Substitutions in Dynamics, Arithmetics and Combinatorics},  
Lecture Notes in Mathematics, Springer, 2002.

\bibitem{Fr} Frid. A. E,
Overlap-free symmetric D0L words,  
{\it Discrete Math. Theor. Comput. Sci.} {\bf 4 }(2001), 357--362.

\bibitem{MM}P. Morton and W. J. Mourant,
Digit patterns and transcendental numbers,  
{\it J. Australian. Math. Soc} {\bf 51} (1991), 216--236.

\bibitem{MSS}J. F. Morgenbesser, J. Shallit, and T. Stoll,
Thue-Morse at multiples of an integer,  
{\it J. Number Theory}  {\bf 131 } (2011), 1498--1512.

\bibitem{Ni}K. Nishioka,
\emph{Mahler Functions and Transcendence},  
Lecture Notes in Mathematics, Springer, 1996.


\end{thebibliography}

\bigskip
\hrule
\bigskip

\noindent 2010 {\it Mathematics Subject Classification}:
Primary 11A63; Secondary 11J99.

\noindent \emph{Keywords: } digit counting, stammering sequence.

\bigskip
\hrule
\bigskip

\vspace*{+.1in}
\noindent
Received August 9 2014;
revised version received  October 10 2014; April 1 2015; July 21 2015; July 31 2015.
Published in {\it Journal of Integer Sequences}, July 31 2015.

\bigskip
\hrule
\bigskip

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


\end{document}

                                                                                




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