\}$. Bold letters are systematically used to denote infinite words throughout this article.

A finite word $p \in \mathcal{A}^*$ is a *prefix* of $u=u_0u_1\cdots u_{n-1}$ if $p= u_0u_1u_2\cdots u_{k-1}$ for some $k\leq n$, the word $u_k u_{k+1} \cdots u_{n-1}$ is denoted $p^{-1}u$. Similarly, $p \in \mathcal{A}^*$ is a prefix of $\uu= u_0u_1u_2\cdots$ if $p=u_0u_1u_2\cdots u_{k-1}$ for some integer $k$. We usually abbreviate $u_0u_1u_2\cdots u_{k-1} = \uu_{[0,k)}$.

A finite word $w$ is a *factor* of $\uu= u_0u_1u_2\cdots$ if there exists an index $i$ such that $w$ is a prefix of the infinite word $u_iu_{i+1}u_{i+2}\cdots$. The index $i$ is called an *occurrence* of $w$ in $\uu$. If each factor of $\uu$ has infinitely many occurrences in $\uu$, the word $\uu$ is *recurrent*.

The *language $\mathcal{L}(\uu)$ of an infinite word $\uu$* is the set of all its factors. The mapping $\mathcal{C}_{\uu}: \mathbb{N}\mapsto \mathbb{N}$ defined by $\mathcal{C}_{\uu}(n) = \#\{w \in \mathcal{L}(\uu): |w|=n\}$ is called the *factor complexity* of the word $\uu$.

An infinite word $\uu$ is *eventually periodic* if $\uu = wvvvvv\cdots $ for some $v,w \in \mathcal{A}^*$. If $w$ is the shortest such word possible, we say that $|w|$ is the *preperiod* of $\uu$; if $v$ is the shortest possible, we say that 