Val Érie Berth É

AND Julien Cassaigne
email: cassaigne@iml.univ-mrs.fr

Wolfgang Steiner
email: steiner@liafa.univ-paris-diderot.fr

BALANCE PROPERTIES OF ARNOUX-RAUZY WORDS

The paper deals with balances and imbalances

Introduction

Among infinite words with low factor complexity, Arnoux-Rauzy words, introduced in [START_REF] Arnoux | Représentation géométrique de suites de complexité 2n + 1[END_REF], play a prominent role. Recall that factor complexity consists in counting the number of factors of a given length, and by low complexity we mean here that its growth is at most linear. A seminal family of low factor complexity words is provided by the Sturmian words (see for instance [START_REF] Lothaire | Algebraic combinatorics on words[END_REF][START_REF] Fogg | Substitutions in dynamics, arithmetics and combinatorics[END_REF][START_REF] Berstel | Combinatorics on words. Christoffel words and repetitions in words[END_REF]), and by their finite counterpart, namely Christoffel words [START_REF] Borel | On Christoffel classes[END_REF][START_REF] Kassel | Sturmian morphisms, the braid group B4, Christoffel words and bases of F 2[END_REF][START_REF] Berthé | On an involution of Christoffel words and Sturmian morphisms[END_REF][START_REF] Paquin | On the superimposition of Christoffel words[END_REF][START_REF] Berstel | Combinatorics on words. Christoffel words and repetitions in words[END_REF]. Sturmian words are defined in purely combinatorial terms, but their associated symbolic dynamical systems also have a very natural geometric description: they are natural codings of rotations of the circle. Arnoux-Rauzy sequences were introduced in [START_REF] Arnoux | Représentation géométrique de suites de complexité 2n + 1[END_REF] in an attempt to find a class of words generalizing properties of Sturmian words. Again, Arnoux-Rauzy words are defined in purely combinatorial terms (see Definition 1 below), and they admit geometric representations as natural codings of 6-interval exchange transformations on the circle. We quote [START_REF] Berthé | On an involution of Christoffel words and Sturmian morphisms[END_REF][START_REF] Berstel | Bifix codes and Sturmian words[END_REF] as illustrations of common behavior shared by Sturmian and Arnoux-Rauzy words concerning the relations between bifix codes and subgroups of the free group.

A wide array of literature is devoted to the study of the combinatorial, ergodic and geometric properties of Arnoux-Rauzy words, which belong to the family of episturmian words [START_REF] Glen | Episturmian words: a survey[END_REF]. The language of Arnoux-Rauzy words can be generated by iterating a finite set of substitutions; this property, which is called S-adic, will be the main viewpoint of our study; see Theorem 2 below. The S-adic generation is governed by a multidimensional continued fraction algorithm of simultaneous approximation described and studied for instance in [START_REF] Arnoux | Représentation géométrique de suites de complexité 2n + 1[END_REF][START_REF] Castelli | Fine and Wilf's theorem for three periods and a genereralization of Sturmian words[END_REF][START_REF] Cassaigne | Fonctions de récurrence des suites d'Arnoux-Rauzy et réponse à une question de Morse et Hedlund[END_REF][START_REF] Cassaigne | Weak mixing and eigenvalues for Arnoux-Rauzy sequences[END_REF].

Despite the fact that they were introduced as generalizations of Sturmian words, Arnoux-Rauzy words display a much more complex behavior, which is not yet fully understood; this is highlighted in [START_REF] Cassaigne | Weak mixing and eigenvalues for Arnoux-Rauzy sequences[END_REF]. Some of the properties shared by purely substitutive Arnoux-Rauzy words sustain the similarity with Sturmian words. For instance, Arnoux-Rauzy substitutions are known to be Pisot [START_REF] Arnoux | Pisot substitutions and Rauzy fractals[END_REF] and thus to generate finitely balanced Arnoux-Rauzy words. Here, finitely balanced means that they are C-balanced for some C > 0; see Definition 6 below. This is the case of the Tribonacci word, which is the Arnoux-Rauzy word fixed by the substitution 1 → 12, 2 → 13, 3 → 1; see for instance [START_REF] Richomme | Balance and Abelian Complexity of the Tribonacci Word[END_REF]. Recall that Sturmian words are 1-balanced. Furthermore, purely substitutive Arnoux-Rauzy words are natural codings of toral translations; see [START_REF] Berthé | Substitutive Arnoux-Rauzy sequences have pure discrete spectrum[END_REF] for a proof. More generally, all Arnoux-Rauzy words were expected to be natural codings of toral translations, a property that implies finite balance; see the discussions in [START_REF] Cassaigne | Imbalances in Arnoux-Rauzy sequences[END_REF][START_REF] Berthé | Interactions between dynamics, arithmetics and combinatorics: the good, the bad, and the ugly[END_REF][START_REF] Cassaigne | Weak mixing and eigenvalues for Arnoux-Rauzy sequences[END_REF] for more details. The first striking fact contradicting this idea came from [START_REF] Cassaigne | Imbalances in Arnoux-Rauzy sequences[END_REF], where examples of Arnoux-Rauzy sequences that are not finitely balanced were constructed.

The aim of the present paper is to try to understand balances and imbalances in Arnoux-Rauzy words, continuing the study performed in [START_REF] Cassaigne | Imbalances in Arnoux-Rauzy sequences[END_REF]. We provide sufficient conditions that guarantee finite balance. In particular, we prove that bounded partial quotients in the Sadic expansion imply finite balance (Theorem 7), but we also exhibit examples of 2-balanced Arnoux-Rauzy words with unbounded partial quotients (Corollary 10). Our results show that a characterization of 2-balanced Arnoux-Rauzy words on a 3-letter alphabet is not at hand. Indeed, the occurrence of certain patterns as prefixes of the S-adic expansion prevent 2-balance (see Theorem 11), but the image by an Arnoux-Rauzy substitution of an Arnoux-Rauzy word that is not 2-balanced can be a 2-balanced sequence.

Note that balance properties of Arnoux-Rauzy words, and more generally of episturmian words, have also been investigated in view of Fraenkel's conjecture; see for instance [START_REF] Paquin | A characterization of balanced episturmian sequences[END_REF] and see also the survey on balanced words [START_REF] Vuillon | Balanced words[END_REF] for more on this conjecture. Moreover, if superimposition properties of Christoffel words, such as considered in [START_REF] Paquin | On the superimposition of Christoffel words[END_REF], are now well understood, much remains to be done in this direction for alphabets with more than 2 letters and for epiChristoffel words such as developped in [START_REF] Paquin | On a generalization of Christoffel words: epichristoffel words[END_REF].

The present paper is organized as follows. After recalling the required definitions in Section 2, we state the main results of the paper in Section 3. Proofs are given in Section 4, with Section 4.1 devoted to balance results, while Section 4.2 shows how to create imbalances.

Definitions

Let A = {1, 2, . . . , d} be a finite alphabet. A substitution σ over the alphabet A is an endomorphism of the free monoid A * . For any word w in the free monoid A * (endowed with the concatenation as operation), |w| denotes the length of w, and |w| j stands for the number of occurrences of the letter j in the word w. A factor of a (finite or infinite) word ω is defined as the concatenation of consecutive letters occurring in ω. A factor w of ω is said to be right special (resp. left special) if there exist at least two distinct letters a, b of the alphabet A such that wa and wb (resp. aw and bw) are factors of ω.

Definition 1 (Arnoux-Rauzy words). Let A = {1, 2, . . . , d}. An infinite word ω ∈ A N is an Arnoux-Rauzy word if all its factors occur infinitely often, and if for all n it has (d -1)n + 1 factors of length n, with exactly one left special and one right special factor of length n.

One checks that Arnoux-Rauzy words are uniformly recurrent, that is, all factors occur with bounded gaps. The symbolic dynamical system (X ω , T ) associated with a given Arnoux-Rauzy word ω is defined as the set X ω of infinite words that have the same language as ω, endowed with the shift map T that sends an infinite word onto the infinite word from which the first letter has been removed.

In order to work with Arnoux-Rauzy words, we will use their representations as S-adic words according to the terminology of [START_REF] Durand | Linearly recurrent subshifts have a finite number of non-periodic subshift factors, Ergodic Theory Dynam[END_REF][START_REF] Fogg | Substitutions in dynamics, arithmetics and combinatorics[END_REF]. We first define the set S of Arnoux-Rauzy substitutions as S = {σ i : i ∈ A}, with

σ i : i → i, j → ji for j ∈ A \ {i} . Theorem 2 ([2]
). An infinite word ω ∈ A N is an Arnoux-Rauzy word if and only if its set of factors coincides with the set of factors of a sequence of the form

lim n→∞ σ i 0 σ i 1 • • • σ in (1),
where the sequence (i n ) n≥0 ∈ A N is such that every letter in A occurs infinitely often in (i n ) n≥0 . Furthermore, such a sequence (i n ) n≥0 ∈ A N is uniquely defined for a given ω.

For any given Arnoux-Rauzy word, the sequence (i n ) n≥0 is called the S-directive word of ω. All the Arnoux-Rauzy words that belong to the dynamical system (X ω , T ) have the same S-directive word.

Remark 3. If one takes the set

S ′ = {σ ′ i : i ∈ A}, with σ ′ i : i → i, j → ij for j ∈ A \ {i} then Arnoux-Rauzy words of the form lim n→∞ σ ′ i 0 σ ′ i 1 • • • σ ′ in (1
) are called standard or characteristic Arnoux-Rauzy words. We choose to work here with the set S that proves to be more convenient for handling balance results.

The following definition is inspired by the fact that Sturmian words also admit S-adic representations governed by the usual continued fraction algorithm; see [START_REF] Lothaire | Algebraic combinatorics on words[END_REF][START_REF] Fogg | Substitutions in dynamics, arithmetics and combinatorics[END_REF] for details.

Definition 4 (Weak and strong partial quotients). Let ω be an Arnoux-Rauzy word with S-directive sequence (i m ) m≥0 . Write

i 0 i 1 i 2 • • • = j k 0 0 j k 1 1 j k 2 2 • • •
, where j n ∈ A, k n ≥ 1, and j n = j n+1 for all n ≥ 0. The powers k n are called weak partial quotients.

Let (n ℓ ) ℓ≥0 be the increasing sequence of integers satisfying n 0 = 0,

{i n ℓ , i n ℓ +1 , . . . , i n ℓ+1 } = A and {i n ℓ , i n ℓ +1 , . . . , i n ℓ+1 -1 } = A
for all ℓ ≥ 0. The quantity (n ℓ+1n ℓ ) is called strong partial quotient.

Notation 5. Let ω be an Arnoux-Rauzy word with S-directive sequence (i m ) m≥0 . For every integer m ≥ 0, we define ω (m) as the following Arnoux-Rauzy word with S-directive sequence (i n ) n≥m :

ω (m) = lim n→∞ σ im σ i m+1 • • • σ in (1).
Lastly, we introduce the notion of finite balance.

Definition 6 (C-balance). Let C ∈ N. A pair of words u, v ∈ A * with |u| = |v| is C-balanced if -C ≤ |u| j -|v| j ≤ C for all j ∈ A . A word ω ∈ A N is C-balanced if all pairs of factors u, v of ω with |u| = |v| are C-balanced.
A word ω ∈ A N is said to be finitely balanced if there exists C ∈ N such that it is Cbalanced.

Results

We now restrict ourselves to 3-letter Arnoux-Rauzy words (i.e., d = 3) for technical combinatorial reasons.

Note that Sturmian sequences are all 1-balanced (and thus finitely balanced) words. This provides even a characterization of Sturmian words: Sturmian words are exactly the binary 1-balanced words that are not eventually periodic. Three-letter words that are 1-balanced are completely characterized in [START_REF] Hubert | Well balanced sequences[END_REF]; in particular, Arnoux-Rauzy words cannot be 1-balanced, see also [START_REF] Paquin | A characterization of balanced episturmian sequences[END_REF]. The so-called Tribonacci word, which is the Arnoux-Rauzy word fixed by the substitution 1 → 12, 2 → 13, 3 → 1, with S-directive sequence 123123 • • • , has been proved to be 2-balanced in [START_REF] Richomme | Balance and Abelian Complexity of the Tribonacci Word[END_REF]. Nevertheless, Arnoux-Rauzy words are now known to be in general far from being 2-balanced. They need not even be finitely balanced [START_REF] Cassaigne | Imbalances in Arnoux-Rauzy sequences[END_REF][START_REF] Cassaigne | Weak mixing and eigenvalues for Arnoux-Rauzy sequences[END_REF].

A natural question is to understand whether the fact that partial quotients are bounded can guarantee (and even characterize) finite balancedness. We have seen that there are two types of partial quotients. The following theorems provide sufficient conditions for (2h+1)-balance and 2-balance respectively.

(i m ) m≥0 . If i m+2 ∈ {i m , i m+1 } (1) for all m ≥ 1 such that i m-1 = i m = i m+1 and (2) for all m ≥ 2 such that i m-2 = i m = i m+1 = i m-1 , then ω is 2-balanced.
Remark 9. The conditions of Theorem 8 on the S-directive sequence can also be stated in terms of a subshift of finite type: Let X be the set of words {1121, 1122, 12121, 12122} together with all the words that are obtained from one of these four words by a permutation of the letters 1, 2, and 3.

If (i m ) m≥0 contains no factor in X, then ω is 2-balanced.
For the proofs of Theorems 7 and 8, which will be given in Section 4.1, we use methods that are typical for the S-adic framework: We work not only with the word ω but simultaneously with all the words ω (m) , by 'desubstituting' the word ω (m) with respect to σ im .

Note that Theorem 8 applies in particular to the Tribonacci word; a generalization of its S-directive sequence 123123 • • • gives the following balancedness result.

Corollary 10. There exist 2-balanced Arnoux-Rauzy words ω with unbounded weak (and thus unbounded strong) partial quotients.

Proof. If the S-directive sequence (i m ) m≥0 satisfies i 0 i 1 • • • = 1 s 0 231 s 1 23 • • • for any sequence (s n ) n≥0 with s n ≥ 1,
then the assumptions of Theorem 8 are satisfied. In other words, any Arnoux-Rauzy word with such an S-directive sequence is 2-balanced.

The following result, which is proved in Section 4.2, can be considered as a partial converse of Theorem 8. It shows in particular that no element of the set X defined in Remark 9 can be omitted: If a word in X is a prefix of an S-directive sequence, then the corresponding Arnoux-Rauzy word is not 2-balanced. (By symmetry of S, the statement of Theorem 11 remains of course true if we apply a permutation of the alphabet A to {1, 3} * 1 2 * 1 2 {1, 2}.) This extends a result of [START_REF] Cassaigne | Imbalances in Arnoux-Rauzy sequences[END_REF], where it was shown that S-directive sequences starting with 112213 give Arnoux-Rauzy words that are not 2-balanced. For arbitrary C, prefixes preventing C-balancedness are also given in [START_REF] Cassaigne | Imbalances in Arnoux-Rauzy sequences[END_REF].

Theorem 11. Let ω be an Arnoux-Rauzy word with d = 3 and S-directive sequence (i m ) m≥0 starting with a word in {1, 3} * 1 2 * 1 2 {1, 2}. Then ω is not 2-balanced.

Theorem 11 also shows that Theorem 7 is optimal for h = 1: There exist Arnoux-Rauzy words with all weak partial quotients equal to 1 that are not 2-balanced, e.g. those where the S-directive sequence starts with 12121.

While it is possible to exclude C-balancedness by looking at a finite prefix of the Sdirective sequence, it was shown in [START_REF] Cassaigne | Imbalances in Arnoux-Rauzy sequences[END_REF] that one cannot guarantee C-balancedness in this way: For any given imbalance C, for any word w ∈ {1, 2, 3} * , for any infinite S-directive sequence (i m ) m≥0 , there exists a word w ′ ∈ {1, 2, 3} * such that the S-directive sequence ww ′ i 0 i 1 • • • gives an Arnoux-Rauzy word that is not C-balanced.

Proposition 12 below gives another evidence that the situation is quite contrasted: It is possible that ω is 2-balanced, ω (1) is not 2-balanced, and ω (m) is again 2-balanced for all m ≥ 2. Thus, the image by an Arnoux-Rauzy substitution of an Arnoux-Rauzy word that is not 2-balanced can be a 2-balanced sequence. In particular, we cannot replace {1, 3} * in Theorem 11 by the full set of words {1, 2, 3} * . Proposition 12. Let ω be an Arnoux-Rauzy word with d = 3 and S-directive sequence (i m ) m≥0 starting with 211213 such that the conditions of Theorem 8 are violated only for m = 2. Then ω is 2-balanced (and ω (m) is 2-balanced for all m ≥ 2), but ω (1) is not 2-balanced.

Remark 13. The conditions of Proposition 12 can be weakened. Indeed, we will use in the proof only that (i m ) m≥0 starts with 211213 and that ω (m) is 2-balanced for all m ∈ {2, 3, 4, 6} to show that ω is 2-balanced (and ω (1) is not 2-balanced).

Summing up, a complete description of 2-balanced Arnoux-Rauzy words on 3 letters in terms of their S-directive sequences seems to be difficult. Note that our proofs strongly rely on the fact that we work with 3-letter alphabets. The case of a larger alphabet is certainly even more intricate.

4. Proofs 4.1. Balances. In order to relate balance properties of ω (m+1) to the ones of ω (m) , we first need the following 'desubstitution' property. For any factor u of ω (m) , m ≥ 0, one easily checks that there exists a unique factor of ω (m+1) , denoted by u ′ , that satisfies We thus introduce the following notation.

(1) i δ m σ im (u ′ ) = u i ε m , where δ = 1 if u starts with i m , 0 otherwise, ε = 0 if u ends with i m , 1
Notation 15. For a factor u of ω (m) , m ≥ 0, let u ′ be the unique factor of ω (m+1) satisfying [START_REF] Arnoux | Pisot substitutions and Rauzy fractals[END_REF]. Recursively, let u (n) be the factor of ω (m+n) given by u (0) = u and u

(n+1) = (u (n) ) ′ , n ≥ 0.
Example 16. We continue Example 14 with u = 12131212. We assume that i m = 1, i m+1 = i m+2 = 2. One has u (0) = u, u (1) = u ′ = 2322, u (2) = 32, and u (3) = 3. Indeed, 1σ 1 (u (1) ) = u (0) 1, 2σ 2 (u (2) ) = u (1) , and σ 2 (u (3) ) = u (2) .

The following lemma provides information on the relations between the length and the number of occurrences of letters in u and u ′ . Lemma 17. Let u be a factor of ω (m) , m ≥ 0. Then there exists δ u ∈ {-1, 0, 1} such that The following two lemmas allow us to easily exhibit a pair of factors of the same length displaying some imbalances when sufficiently large imbalances occur for factors that are not necessarily of the same length. Proof of Theorem 7. Let ω be an Arnoux-Rauzy word with d = 3 and weak partial quotients that are bounded by h. We will prove that not only ω, but all ω (m) are (2h+1)balanced. We will work by contradiction and consider a pair of factors of equal length that is not (2h+1)-balanced. We will furthermore take it with minimal length among all such pairs, and for all sequences ω (m) . This minimality assumption will prove to be crucial and provide the desired contradiction.

|u ′ | = |u| im + δ u , |u ′ | j = |u| j if j ∈ A \ {i m }, 2 |u| im -|u| + δ u if j = i m . Furthermore, |u ′ | < |u| if |u| ≥ 2, and |u ′ | ∈ {0, 1} if |u| ∈ {0, 1}.
So, suppose that ω (m) is not (2h+1)-balanced for some m ≥ 0. Let u, v be a pair of factors of ω (m) , m ≥ 0, with |u| = |v|, that is not (2h+1)-balanced. Assume w.l.o.g. that |u| is minimal, that is, for any ℓ ≥ 0, for any pair of factors x, y of ω (ℓ) with |x| = |y| < |u| = |v|, and for any letter k, one has |x| k -|y| k ≤ 2h + 1. This implies that |u| j -|v| j = 2h + 2 for some j ∈ A. Moreover, we can assume w.l.o.g. that m = 0 and that |u| j -|v| j = 2h + 2 .

We now want to reach a contradiction. We can easily rule out the case j = i 0 . Indeed, Lemma 17 gives

|u ′ | i 0 -|v ′ | i 0 = 2 (2h + 2) + δ u -δ v and |u ′ | -|v ′ | = 2h + 2 + δ u -δ v ,
|u| i 0 -|v| i 0 = -1 , |u| j -|v| j = 2h + 2 , |u| k -|v| k = -2h -1 , with A = {i 0 , j, k}.
Let n ≥ 1 be such that i

0 = i 1 = • • • = i n-1 = i n . Then |u (ℓ) | j -|v (ℓ) | j = 2h + 2 and |u (ℓ) | k -|v (ℓ) | k = -2h -1 for 0 ≤ ℓ ≤ n.
Therefore, the above arguments showing that

|u ′ | > |v ′ | now show that |u (ℓ+1) | > |v (ℓ+1) | for 0 ≤ ℓ < n (note that |u (ℓ) | ≤ |u| by Lemma 17). For 1 ≤ ℓ < n, we do not have |u (ℓ) | i 0 -|v (ℓ) | i 0 = -1. Nevertheless, we calculate |u (ℓ+1) | -|v (ℓ+1) | ≤ |u (ℓ) | i 0 -|v (ℓ) | i 0 + 2 = |u (ℓ) | -|v (ℓ) | + 1
for 0 ≤ ℓ < n. By the assumption of the theorem, we have n ≤ h, thus

(2) 1 ≤ |u (n) | -|v (n) | ≤ n ≤ h .
We cannot have i n = k, since this would imply Since

|u (n+1) | -|v (n+1) | ≤ -2h + 1 < 0 and |u (n+1) | j -|v (n+1) | j = 2h+2,
i n = k, we have i 0 = i 1 = • • • = i n-1 = i n = j.
Then, by Lemma 17,

|u (n+1) | -|v (n+1) | ≥ 2h . Let r ≥ 1 be such that i n = i n+1 = • • • = i n+r-1 = i n+r . According to Lemma 17, |u (ℓ) | k = |u (n) | k , |v (ℓ) | k = |v (n) | k , and similarly |u (ℓ) | i 0 = |u (n) | i 0 , |v (ℓ) | i 0 = |v (n) | i 0 , for n ≤ ℓ ≤ n + r.
We thus deduce from these equalities and from (2) that

|u (ℓ) | j -|v (ℓ) | j -|u (ℓ) | -|v (ℓ) |) = |u (n) | j -|v (n) | j -|u (n) | -|v (n) |) ≥ h + 2
for n ≤ ℓ ≤ n + r, and then, from Lemma 17, that Proof of Theorem 8. Similarly to the proof of Theorem 7, suppose that ω (m) is not 2balanced for some m ≥ 0. Let u, v be factors of ω (m) , m ≥ 0, with minimal length |u| = |v| such that |u| j -|v| j = 3 for some j ∈ A, and assume w.l.o.g. m = 0. The proof of Theorem 7 shows that we must have

|u (ℓ+1) | -|v (ℓ+1) | ≥ |u (ℓ) | j -|v (ℓ) | j -2 ≥ |u (ℓ) | -|v (ℓ) | + h for n ≤ ℓ < n + r, in particular |u (n+r) | -|v (n+r) | ≥ |u (n+1) | -|v (n+1) |. This implies |u (n+r) | j -|v (n+r) | j - |u (n+r) | -|v (n+r) | 2 = |u (n+r) | j -|v (n+r) | j -|u (n+r) | -|v (n+r) | + |u (n+r) | -|v (n+r) | 2 ≥ h + 2 + |u (n+1) | -|v (n+1) | 2 ≥ 2h + 2 .
|u| i 0 -|v| i 0 = -1 , |u| j -|v| j = 3 , |u| k -|v| k = -2 ,
with A = {i 0 , j, k}, and

|u (n) | j -|v (n) | j = 3 , |u (n) | k -|v (n) | k = -2 , 1 ≤ |u (n) | -|v (n) | ≤ n , for n ≥ 1 satisfying i 0 = i 1 = • • • = i n-1 = i n . Moreover, we must have i n = j, thus |u (n+1) | k -|v (n+1) | k = -2 , |u (n+1) | -|v (n+1) | ≥ |u (n) | j -|v (n) | j -2 = 1 .
By assumption (1) of the theorem, we have either n ≥ 2 and i n+1 = k, or n = 1.

If i n+1 = k (which holds in particular if n ≥ 2), then Lemma 17 gives Lemma 17, this contradicts the minimality of |u|.

|v (n+2) | k -|u (n+2) | k -|v (n+2) | -|u (n+2) | = |v (n+1) | k -|u (n+1) | k -|v (n+1) | -|u (n+1) | ≥ 3 (3) and |v (n+2) | k ≥ |u (n+2) | k . Thus Lemma 19 provides factors û, v of ω (n+2) with |û| = |v| = |u (n+2) | and |v| k -|û| k ≥ 3. As |u (n+2) | < |u| by
It remains to consider the case n = 1, i 2 = k. We have seen above that n = 1 means that i 1 = j, |u (1) | j -|v (1) | j = 3, |u (1) | k -|v (1) | k = -2, and |u (1) | -|v (1)

| = 1. Let r ≥ 1 be such that j = i 1 = i 2 = • • • = i r = i r+1 .
Similarly to the proof of Theorem 7, we get

|u (ℓ) | j -|v (ℓ) | j -|u (ℓ) | -|v (ℓ) | = |u (1) | j -|v (1) | j -|u (1) | -|v (1) | = 2 for 1 ≤ ℓ ≤ r + 1, hence |u (ℓ+1) | -|v (ℓ+1) | ≥ |u (ℓ) | j -|v (ℓ) | j -2 = |u (ℓ) | -|v (ℓ) | for 1 ≤ ℓ ≤ r, thus |u (r+1) | -|v (r+1) | ≥ 1 , |u (r+1) | j -|v (r+1) | j ≥ 3 , |u (r+1) | k -|v (r+1) | k = -2 .
We cannot have i r+1 = k. Indeed, we would have |u (r+2) | j -|v (r+2) | j ≥ 3 and |u (r+2) | ≤ |v (r+2) | by Lemma 17, contradicting the minimality of |u| by Lemma 19.

We thus have

i r+1 = i 0 , hence |u (r+2) | j -|v (r+2) | j ≥ 3 and |u (r+2) | k -|v (r+2) | k = -2 by Lemma 17.
Similarly to the preceding paragraph, we exclude i r+2 = k. Then assumption (1) of the theorem forces r = 1. Let now s ≥ 1 be such that

(i 0 =) i 2 = i 3 = • • • = i s+1 = i s+2 . Again, Lemma 17 gives |u (s+2) | j -|v (s+2) | j ≥ 3 and |u (s+2) | k -|v (s+2) | k = -2,
and we can exclude i s+2 = k, i.e., we have i s+2 = j. By Lemma 17, we have Since σ im (u) and σ im (v) end with i m , and i m σ im (u) and i m σ im (v) are factors of ω (m) , we obtain every δ ∈ {±1, ±2} by removing i m at the end of σ im (u) and/or σ im (v) and/or appending i m in front of σ im (u) and/or σ im (v).

|u (s+3) | -|v (s+3) | ≥ |u (s+2) | j -|v (s+2) | j -2 ≥ 1 , |u (s+3) | k -|v (s+3) | k = -2 . Since i 0 = i s = i s+1 = i s+2 = j in case s ≥ 2, and i 0 = i 2 = i 3 = i 1 = j in case s = 1,
Proof of Theorem 11. We first prove that ω (m) contains factors u, v whose difference of Parikh vectors (|u|

1 -|v| 1 , |u| 2 -|v| 2 , |u| 3 -|v| 3 ) is (1, 2, -2) or (-1, 2, -2).
Starting from such a pair (u, v) and applying the substitution corresponding to any given word in {1, 3} * 1 2 * 1 2 {1, 2}, we will then exhibit an imbalance of 3 in ω.

By Theorem 2, the sequence (i m ) m≥0 contains infinitely many occurrences of 1, 2, and 3 respectively. Therefore, for any m ≥ 0,

i m i m+1 • • • starts with a word in 1 * 2 A * 2 A * 3 A * 3 or 1 * 3 A * 3 A * 2 A * 2. Assume first i m • • • i m+3 = 2233.
Starting with the factor u = 1 of ω (m+4) and v the empty word, and successively applying Lemma 21, we obtain the following chain of vectors

(|û| 1 -|v| 1 , |û| 2 -|v| 2 , |û| 3 -|v| 3 ) for factors û, v of ω (n) , m + 4 ≥ n ≥ m:   1 0 0   σ 3 -→   1 0 -1   σ 3 -→   1 0 -2   σ 2 -→   1 1 -2   σ 2 -→   1 2 -2   .
We can insert between the terms of this chain some substitutions that will not alter the difference vectors that have been created. Indeed, except for the last vector, any of these vectors is the image of itself by any substitution σ j , j ∈ A, and some δ ∈ {0, ±1, ±2} as in Lemma 21. More precisely, if (u, v) are factors of ω (n+1) satisfying (|u| 1 -|v| 1 , |u| 2 -|v| 2 , |u| 3 -|v| 3 ) = (1, 0, -1), then whatever the value of i n , there exist factors û, v of ω (n) with the same difference vector (1, 0, -1). The same holds for the vectors (1, 0, -2) and (1, 1, -2), while the last vector (1, 2, -2) is stabilized only by σ 1 and σ 2 . Therefore, if

i m i m+1 • • • starts with a word in 1 * 2 A * 2 A * 3 A * 3, then ω (m) contains factors u, v with (|u| 1 -|v| 1 , |u| 2 -|v| 2 , |u| 3 -|v| 3 ) = (1, 2, -2). Symmetrically, if i m i m+1 • • • starts with a word in 1 * 3 A * 3 A * 2 A * 2, then the chain   -1 0 0   σ 2 -→   -1 1 0   σ 2 -→   -1 2 0   σ 3 -→   -1 2 -1   σ 3 -→   -1 2 -2   gives factors u, v of ω (m) with (|u| 1 -|v| 1 , |u| 2 -|v| 2 , |u| 3 -|v| 3 ) = (-1, 2, -2). This finishes our first step. Starting with factors u, v ∈ ω (m) such that (|u| 1 -|v| 1 , |u| 2 -|v| 2 , |u| 3 -|v| 3 ) = (±1, 2, -2), we now use the chain   ±1 2 -2   σ 1 -→   1 2 -2   σ 2 -→   1 3 -2   σ 1 -→   0 3 -2   σ 1 -→   -1 3 -2   .
Here, (0, 3, -2) is fixed by σ 2 (with δ = 2); (-1, 3, -2) is fixed by σ 1 (with δ = -1) and by σ 3 (with δ = -2), i.e., this chain can be used for any word in {1, 3} *

i 1 i 2 • • • starts with a word in {1, 3} * 1 2 * 1 2 1, then ω contains factors u, v such that (|u| 1 -|v| 1 , |u| 2 -|v| 2 , |u| 3 -|v| 3 ) = (1, 3, -2), which implies that ω is not 2-balanced. If a prefix of i 0 i 1 i 2 • • • is in {1, 3} * 1 2 * 1 2 2,
then we get the same result, as i 0 i 1 i 2 • • • starts now with a word in {1, 3} * 1 2 * 1 2 followed by an element of 2 A * 2 A * 3 A * 3.

Proof of Proposition 12.

Let ω satisfy the conditions of the proposition. Since the conditions of Theorem 8 are violated only for m = 2, the Arnoux-Rauzy words ω (m) , m ≥ 2, satisfy all conditions of Theorem 8 and are thus 2-balanced. By Theorem 11, ω (1) is not 2-balanced.

The proof of the 2-balancedness of ω will be similar to the proofs of Theorems 7 and 8: Supposing that ω contains a pair of factors that are 2-unbalanced, we construct from this pair a 2-unbalanced pair of factors of ω (m) . The only difference is that we require now m ≥ 2.

We first show that ω (1) has no factors u, v with |u| = |v| and |u| 1 -|v| 1 = 3 or |u| 3 -|v| 3 = 3. To this end, recall that the S-directive sequence of ω (1) starts with 112. The proof of Theorem 7 (see also the proof of Theorem 8) shows that if ω (1) had factors u, v with |u| = |v| and |u| 1 -|v| 1 = 3, then the same would be true for ω (2) , contradicting that ω (2) is 2-balanced. We also see from the proof of Theorem 7 that the existence of factors u, v of ω (1) with |u| = |v| and |u| 3 -|v| 3 = 3 contradicts that ω (m) is 2-balanced for all m ∈ {2, 3, 4}. Now suppose that ω is not 2-balanced, i.e., there exist factors u, v of ω with |u| = |v| and |u| j -|v| j = 3 for some j ∈ A. Recall that i 0 i 1 • • • i 5 = 211213.

Assume first j = 3. By Lemma 17, we have |u (2) | 3 -|v (2) | 3 = |u (1) | 3 -|v (1) | 3 = 3, |u (1) | -|v (1) | ≤ |u| 2 -|v| 2 + 2, and |u (2) | -|v (2) | ≤ |u (1) | 1 -|v (1) (2) | ≤ |v (2) | or |u (1) | ≤ |v (1) |. By Lemma 19, this contradicts that ω (2) is 2-balanced or that imbalances of size 3 do not occur in ω (1) for the letter 3.

Assume now j = 2. We deduce from Lemma 17 that |u (1) | 2 -|v (1) | 2 ≥ 4, |u (1) |-|v (1) | ≥ 1. In the last paragraph we have seen that |u| 3 -|v| 3 ≤ -3 is impossible. This implies |u| 1 -|v| 1 ≤ -1, hence |u (1) | 1 -|v (1) | 1 ≤ -1 by Lemma 17. Now we obtain by Lemma 17 that |u (2) | -|v (2) | ≤ 1 and |u (2) | 2 -|v (2) | 2 ≥ 4, which by Lemma 19 contradicts the 2balancedness of ω (2) .

Finally, assume j = 1. Then Lemma 17 provides |u (1) | 1 -|v (1) | 1 = 3. We cannot have |u (1) | ≤ |v (1) |, as this contradicts by Lemma 19 that imbalances of size 3 do not occur in ω (1) for the letter 1. Therefore, we must have |u| 2 -|v| 2 ≥ -1 by Lemma 17. As |u| 3 -|v| 3 ≤ -3 is impossible, we get

|u| 1 -|v| 1 = 3 , |u| 2 -|v| 2 = -1 , |u| 3 -|v| 3 = -2 ,
Using that |u (1) | > |v (1) |, Lemma 17 gives |u (1) | 1 -|v (1) | 1 = 3 , |u (1) | 2 -|v (1) | 2 = 0 , |u (1) | 3 -|v (1) | 3 = -2 .

As i 1 = i 2 = 1, i 3 = 2, further applications of Lemma 17 give |u (4) | 1 -|v (4) | 1 = |u (3) | 1 -|v (3) | 1 ≥ 2 |u (2) | 1 -|v (2) | 1 -|u (2) | -|v (2) | -2 = |u (2) | 1 -|v (2) | 1 + |u (1) | 1 -|v (1) | 1 -|u (1) | -|v (1) | -2 = |u (2) | 1 -|v (2) | 1 ≥ 3 and, with i 4 = 1, |u (5) | -|v (5) | ≥ 1 , |u (5) | 3 -|v (5) | 3 = |u| 3 -|v| 3 = -2 .

Since i 5 = 3, we can replace n by 4 and k by 3 in (3) and the subsequent lines, and get a contradiction to the 2-balancedness of ω (6) .

Theorem 7 .

 7 Let ω be an Arnoux-Rauzy word with d = 3 and S-directive sequence (i m ) m≥0 . If the weak partial quotients are bounded by h, i.e., if we do not have i m = i m+1 = • • • = i m+h for any m ≥ 0, then ω is (2h+1)-balanced. Theorem 8. Let ω be an Arnoux-Rauzy word with d = 3 and S-directive sequence

  otherwise. Note that the definition of u ′ depends on m. (More precisely, it depends only on i m .) For simplicity, we omit this dependence. Example 14. Let u = 12131212. Assume that i m = 1. One has δ = 1, ε = 1, and u ′ = 2322, with 1σ 1 (2322) = u1.

Example 18 .

 18 We continue Example 14 with u = 12131212, i m = 1 and u ′ = 2322. One has|u ′ | = 4 = |u| 1 , with δ u = 0. Furthermore, |u ′ | 1 = 0 = 2|u| 1 -|u|, |u ′ | 2 = |u| 2 , |u ′ | 3 = |u|3 . Proof. By the definition of u ′ , we have |u ′ | j = |u| j for all j ∈ A \ {i m }, and |u ′ | = |u| im + δ u with δ u = εδ. It follows that |u ′ | im = 2 |u| im -|u| + δ u . This ends the proof of the first part of the statement. If |u| = 0, then we have u ′ = i m . If |u| = |u| im ≥ 1, then we have δ u = -1, thus |u ′ | < |u|. Otherwise, if u does not only contain the letter i m , we have |u ′ | ≤ |u|, with |u ′ | = |u| if and only if |u| im = |u| -1, δ u = 1. Since δ u = 1 means that u does not start or end with i m , |u| im = |u| -1 implies that |u| = 1.

Lemma 19 . 2 . 2 -

 1922 Let u, v ∈ A * and j ∈ A such that |u| j -|v| j > C + max 0, |u| -|v| . Then there exist factors û of u and v of v with |û| = |v| = min(|u|, |v|) and |û| j -|v| j > C. Proof. We first assume |u| ≤ |v|, hence |u| j -|v| j > C. Let û = u and take for v any factor of v with the same length as u (hence |v| = |û|). Then |û| j -|v| j ≥ |u| j -|v| j > C. We now assume |u| > |v|. Take v = v and any factor û of u with |û| = |v|. One has |û| j + |u| -|v|) ≥ |u| j . We get |û| j -|v| j ≥ |u| j -|u| -|v|) -|v| j > C. Lemma 20. Let u, v be factors of σ i (w) for some w ∈ A * such that |u| ≥ |v| and |u| j -|v| j > C + |u| -|v| 2 for some j ∈ A \ {i} . Then there exist factors û of u and v of v with |û| = |v| and |û| j -|v| j > C. Proof. Let v = v and û be the prefix (or suffix) of u with |û| = |v|. Since there are no two consecutive letters j in σ i (w) and thus in u, we obtain that |u| j ≤ |û| j + |u|-|v| This implies |û| j -|v| j ≥ |u| j -|u|-|v| |v| j > C.

  thus Lemma 19 provides in turn factors û, v of ω(1) with |û| = |v| = |v ′ | that are not (2h+1)-balanced, with |v ′ | < |v| (note that |v| = |u| ≥ |u| j = |v| j + 2h + 2 ≥ 2), contradicting the minimality of |u|.Assume from now on that j = i 0 , thus|u ′ | j -|v ′ | j = 2h + 2. If |u ′ | ≤ |v ′ |,then Lemma 19 gives factors û, v of ω (1) with |û| = |v| = |v ′ | < |u| and |û| j -|v| j ≥ 2h + 2, contradicting again the minimality of |u|. Therefore, we must have |u ′ | > |v ′ |. By Lemma 17, this implies in particular that |u| i 0 -|v| i 0 ≥ -1. The equality |u| = |v| then gives that |u| k -|v| k ≤ -2h -1 for the remaining third letter k ∈ A \ {i 0 , j}.Observe that we also have|u| k -|v| k ≥ -2h -1. For if |u| k -|v| k ≤ -2h -2,then by Lemma 17 one has |u ′ | k -|v ′ | k ≤ -2h -2, and Lemma 19 together with the fact that |u ′ | > |v ′ | gives factors û, v of ω (1) with |û| = |v| = |v ′ | < |u| and |v| k -|û| k ≥ 2h + 2, contradicting the minimality of |u|. Thus we obtain that

  hence the existence of factors û, v of ω (n+1) with |û| = |v| < |u| and |û| j -|v| j ≥ 2h + 2 by Lemma 19.

Now, Lemma 20

 20 provides factors û, v of ω (n+r) with |û| = |v| = |v (n+r) | and |û| j -|v| j ≥ 2h+2. Since |v (n+r) | < |v| by Lemma 17, we have obtained a contradiction to the minimality of |u| in the last remaining case as well. Therefore, ω is (2h+1)-balanced if the weak partial quotients are bounded by h.

  the assumptions of the theorem force now i s+3 = k. Replacing n by s+2 in (3) and the subsequent lines, we get factors û, v of ω (s+4) with |û| = |v| = |u (s+4) | < |u| and |v| k -|û| k ≥ 3, providing the desired contradiction to the minimality of |u|. 4.2. Imbalances. In order to prove Theorem 11 and Proposition 12, we first need a lemma that allows us to exhibit pairs of factors in ω (m) having prescribed differences of Parikh vectors, with the Parikh vector associated with the word w being defined as (|w| 1 , |w| 2 , |w| 3 ). Lemma 21. Let u, v be factors of ω (m+1) , m ≥ 0. Then, for any δ ∈ {0, ±1, ±2}, there exist factors û, v of ω (m) such that |û| im -|v| im = |u| -|v| + δ , |û| j -|v| j = |u| j -|v| j for all j ∈ A \ {i m } . Proof. Clearly, σ im (u) and σ im (v) are factors of ω (m) , with |σ im (u)| im -|σ im (v)| im = |u| -|v|, |σ im (u)| j -|σ im (v)| j = |u| j -|v| j for j ∈ A \ {i m } .

| 1 + 2 =

 12 |u| 1 -|v| 1 + 2. Since |u| = |v| and |u| 3 -|v| 3 = 3, we have either |u| 1 -|v| 1 ≤ -2 or |u| 2 -|v| 2 ≤ -2, thus |u

Acknowledgments

We warmly thank Sébastien Ferenczi and Pierre Arnoux for useful discussions on the subject.