On long arithmetic progressions in binary Morse-like words

We present results on the existence of long arithmetic progressions in the Thue-Morse word and in a class of generalised Thue-Morse words. Our arguments are inspired by van der Waerden's proof for the existence of arbitrary long monochromatic arithmetic progressions in any finite colouring of the (positive) integers.


Introduction
The fixed point of the Prouhet-Thue-Morse (or Thue-Morse) substitution has numerous interesting properties.Many of these can be found in [1,2], which is, respectively contains, an extensive survey of properties of the Thue-Morse language.The inspiration behind our results comes from one of the most well-known Ramsey-type theorems, namely van der Waerden's theorem.It states that any colouring of the integers contains arbitrarily long arithmetic progressions.Before we make this more precise, we introduce a couple of notions.Definition 1.Let L and d be positive integers.An arithmetic progression of difference d and length L is a finite sequence of integers a 0 , a 0 + d, . . ., a 0 + (L−1)d.Definition 2. Let c be a positive integer.A colouring of a set of integers S ⊆ N by c colours is a map S −→ C, where C is a finite set of c distinct colours.Now, we can state van der Waerden's theorem [28,14].
Theorem 3 (van der Waerden [28]).Let L and c be positive integers.There exists a positive integer N such that any c-colouring of the segment {1, 2, . . ., N} contains a monochromatic arithmetic progression of length L.
By van der Waerden's theorem, if v is an infinite sequence over a finite alphabet A (that is, v ∈ A N ) then, for each positive integer L, v contains monochromatic arithmetic progression of length L. Here, the existence of an arithmetic progressions with difference d and length L means that there is n ∈ N such that We can then ask whether the word v contains arbitrary long arithmetic progressions for a fixed positive difference d.This question is closely related to the existence of infinite arithmetic progressions: given d, is there n ∈ N such that v n = v n+md for each positive integer m?
If v is a fixed point of a primitive constant-length substitution, the existence of infinite arithmetic progressions is related to the spectral theory of the corresponding dynamical system.Note that we can alternatively consider a bi-infinite sequence w ∈ A Z that is a repetitive fixed point of the same substitution and ask whether there exists n ∈ Z such that w n = w n+md for each m ∈ Z.This problem on bi-infinite sequences w is equivalent to the original problem on v, since both define the same language and hence the same shift space.
We recall the fact that for a constant-length substitution, its dynamical system (with Z shift-action) has pure point (discrete) spectrum if and only if the corresponding tiling dynamical system (with R translation-action) has pure point spectrum.Using this fact and [22,Theorem 5.1], we have the following.
Theorem 4 ([22, Theorem 5.1]).Let w be a repetitive fixed point of a primitive, constant-length substitution.Then w contains infinite arithmetic progressions if and only if w has pure point dynamical spectrum.
As a corollary of van der Waerden's theorem, we have that for any n ∈ N, the word 0 n occurs within the Thue-Morse sequence as an arithmetic progression.This makes an interesting contrast with the well-known fact that Thue-Morse is strongly cube-free (or overlap-free).Another interesting result [4] states that any binary word appears as an arithmetic progression within the Thue-Morse word.The nonexistence of infinite monochromatic arithmetic progressions within infinite words has been addressed in [18,29] and the problem of what types of finite words can appear as arithmetic progressions within substitution (and other) sequences has been considered in several contexts.The notion of arithmetic complexity, which generalises the subword complexity, has, for instance, been studied in [10,11,3,9].Other related questions on Thue-Morse type systems concern the sequence of values at multiples of an integer [20], Gowers uniformity norms [16] or prefix palindromic lengths [12].
This paper is organised as follows.We start by reconsidering arithmetic progressions in the Thue-Morse word [1,2] in Section 2, re-establishing results of Parshina [23] in a different way.Rather than using binary arithmetic, our proofs are mainly based on exploiting the substitution structure of the Thue-Morse word.In addition to the long arithmetic progressions observed in [23] for differences d = 2 n − 1, we find another series of long progressions for differences d = 2 n + 1.
Our results generalise to a set of binary bijective substitutions which are analysed in Section 3. We note that our generalised Thue-Morse substitutions [15,19,7,6] are different from those considered by Parshina [24].In Section 4, we establish a bound for the existence of certain arithmetic progressions for general bijective substitutions on an arbitrary alphabet, before concluding in Section 5 with some open questions and proposed directions for further research.

Arithmetic progressions in the Thue-Morse word
We use N to denote the set of non-negative integers and N + = N \ {0} for the set of positive integers.Apart from Section 4, we will work with the binary alphabet A = {0, 1} throughout this paper.For a finite word w = w 0 w 1 . . .w n−1 ∈ A n , we denote its length by |w| = n.For any finite or infinite word w, we denote by w i its letter at position i < |w|, and by w [i,j) its subword (factor) w i w i+1 . . .w j−1 of length j − i, for 0 i < j |w|, with analogous definitions for bi-infinite words.
We consider the Thue-Morse word v ∈ {0, 1} N arising from the substitution as the fixed point v = lim n→∞ θ n (0).Note that this substitution is bijective and symmetric under the 'bar' operation that exchanges the two letters (so a = 1 − a for a ∈ {0, 1}, referred to as a 'bar-swap symmetry' in [5]), which also implies that for all i ∈ N. The letter v i is thus 0 if the binary expansion of i contains an even number of 1s, and 1 otherwise.Also, v is overlap-free, which means that, for any finite, non-empty word w, v does not contain www 0 as a subword, where w 0 denotes the first letter of w.Note also that θ n (a) is reflection-symmetric if n is even, and antisymmetric (meaning that the reflected word is the image under the bar operation) if n is odd.
For n ∈ N, we have the well-known recursions as can easily be shown by induction.This implies the following property.Proof.This follows from the compactness of the associated dynamical system (see [8] for general background) and from Theorem 4. Indeed, assume that the Thue-Morse word does contain arbitrarily long arithmetic progressions with difference d.Note that if it contains a length L arithmetic progression of colour 0, then it also contains a length L arithmetic progression of colour 1.Thus, the colour of the arithmetic progression does not matter for this argument.
Then, we can find positions i j for all j ∈ N such that v i j is the first letter of a finite arithmetic progression of a fixed colour, difference d and length L j , satisfying L k > L j for k > j, meaning that the lengths of the progressions are increasing.
Then (T i j v) j∈N , where T denotes the shift map, is a sequence of words in the Thue-Morse dynamical system.By compactness, there exists a convergent subsequence, and the corresponding limit word contains an infinite monochromatic arithmetic progression of difference d starting with its first letter.
Since the Thue-Morse sequence does not have pure point dynamical spectrum, this contradicts Theorem 4. Hence there are no arbitrarily long monochromatic arithmetic progressions of difference d in the Thue-Morse word.Thus, we may now introduce the following well-defined notion.Since θ(v) = v, we know that A(2 n d) = A(d) for any n ∈ N. In particular, since v is overlap-free, this implies A(2 n ) = A(1) = 2 for all n ∈ N. The following results shows that A(d) = 2 holds only for differences d that are powers of 2. Lemma 8. Let d > 1 be an odd integer.Then A(d) 3.
Proof.Assume first that the binary expansion of d contains an even number of 1s.Since multiplication by 2 conserves the number of 1s, we have v 0 = v d = v 2d = 0 and so A(d) 3.
Now consider the case that the binary expansion of d contains an odd number of 1s, and hence at least 3. Write d = 2 m + 2 n + k, with m > n and k < 2 n , so k again contains an odd number of 1s in its binary expansion.Let i = 2 m+1 + 2 n , with v i = 0. Then i + d = 2 m+1 + 2 m + 2 n+1 + k.If m > n + 1, the number of 1s in the binary expansion of i+d is even.If m = n+1, then i+d = 2 n+3 +k and so, the number of 1s in its binary expansion is even too.Hence, v i+d = 0. Furthermore, i+2d = 2 m+2 +2 n+1 +2 n +2k.If 2 n > 2k, the number of 1s in the binary expansion of i + 2d is even.If 2 n 2k < 2 n+1 , we write 2k = 2 n + t, where the number of 1s in the binary expansion of t is even, and so, i + 2d = 2 m+2 + 2 n+2 + t and its binary expansion has an even number of 1s.Therefore, v i+2d = 0 and A(d) 3. Parshina proved the following result [23], as well as a generalisation to similar sequences in larger alphabets [24,25].Her proofs for the Thue-Morse case [23] are based on a detailed analysis of binary arithmetic.
In this paper, we will give exact expressions of A(d) for certain values of d, first for the Thue-Morse sequence, and later also for generalised Thue-Morse sequences, which are different generalisations from those considered in [23,24,25].In particular, all our sequences are on a two-letter alphabet.Our results include a simple proof of the value of A(2 n −1) stated in Theorem 10, but also identify a second series of long monochromatic arithmetic progressions in the Thue-Morse word, which becomes the 'longest' in some cases, provided one considers the maximum over a different range for d.
Our proofs will follow van der Waerden's argument.For this, let us define the following block substitutions.Definition 11.Let Θ be the block substitution on the alphabet {0, 1} defined by Iterating Θ on a single letter produces square blocks of size 2 n ×2 n , for instance where we used black (for 0) and white (for 1) squares to emphasise the block structure.Note that the blocks along both diagonals are always of the same colour.
Proof.This follows by induction from noticing that so that, read row-wise from the top, the image of a under Θ is θ(a)θ(a) = θ 2 (a).
The images of letters under Θ n have the following properties.
Lemma 13.For a ∈ {0, 1} and n ∈ N + , the blocks Θ n (a) consists of only two types of row and column words, and are symmetric under reflection in either diagonals.All entries on the main diagonal are a, while entries of the other diagonal are a for even n and a otherwise.
So each row is one of these two words.
The symmetry in the diagonals follows from the symmetry of the block inflation Θ, which also implies that all columns are either θ n (0) or θ n (1).
It is obvious from the inflation rule that the elements of Θ n (a) on the main diagonal are always a. On the other diagonal, note that Θ(a) has a while Θ 2 (a) has a, which implies the claim.Lemma 14.For all n ∈ N + , we have that A(2 n ±1) 2 n .For even n, we further have A(2 n −1) 2 n + 2.
Proof.Consider the block Θ n (a), which, when read row-wise from the top, is the word θ 2n (a).As shown in Lemma 12, all elements on the main diagonal are a, so we find that A(2 n +1) 2 n .Similarly, the elements on the other diagonal are either all a or a, so we also have A(2 n −1) 2 n .For even n, both diagonals have a entries, and so the first and last letter of θ 2n (a) are also part of the arithmetic progression of difference 2 n −1, which implies the claim.
Before we establish the values for A(2 n ±1), we prove a useful result, which exploits the recognisability of the substitution; see [8] and references therein for general background.
Lemma 15.For n > 1 and a ∈ {0, 1}, the word w = θ n (a) occurs in the Thue-Morse word either as the level-n superword itself, or in the centre of two level-n superwords θ n (a) θ n (a).
Furthermore, if w is followed by the letter a, or if w is preceded by the letter a (for n odd) or a (for n even), it is the level-n superword.
which holds for all n > 1.By recognisability, the two adjacent level-(n−2) superwords θ n−2 (a) cannot belong to the same level-(n−1) superword, so we know that θ n (a) has to consist of two level-(n−1) superwords, which only leaves the two possibilities, since all level-(n−1) boundaries are determined.
If w = θ n−1 (a) θ n−1 (a) is followed by a letter a, the next level-(n−1) superword is determined to be θ n−1 (a), and the level-n superword boundary has to fall between w and the subsequent letter a, which shows that w is the level-n superword.The same happens when w is preceded by the final letter of the superword θ n−1 (a), which is a for odd n and a for even n.
Proof.We first show that there exist arithmetic progressions of length 2 n +2.From the proof of Lemma 14, we already have an arithmetic progression of length 2 n in the word w = θ 2n (a), with the first and final letter being part of the progression.Now consider how many letters can be added at either end of the progression of length 2 n in the superword w = θ 2n (a).From Lemma 15, we know that the word w = θ 2n−1 (a) θ 2n−1 (a) and that these are the actual level-(2n−1) superwords.There are for possibilities how this superword can be bordered by level-(n−1) superwords: we can have θ 2n−1 (b) w θ 2n−1 (c) with b, c ∈ {a, a}.
Since d = 2 n + 1, no element of the progression is in the level-n superwords adjacent at either end.Since all superwords start or end with a level-2 superword bbbb, the next two members on either side would have to be the first and the second letter of the same superword θ n (b), which however are different letters (where we use that n > 1).This shows that the progression can at most be extended by one in either direction.Since all combinations of superwords on either side can appear, there are instances where the progression can be extended by exactly one step in both directions, showing that A(2 n +1) ≥ 2 n + 2.
It remains to be shown that this is the maximum length of a progression.Assume that we have a progression of length L > 2 n .The elements in this progression hit each position in the superwords of level-n at least once.Now, once we hit the first position of such a superword, the following members of the progression determine the sequence of level-n superwords uniquely, which is the same sequence as that of the superword w.If there are at least 2 n terms in the progression following this position, they determine the level-(2 n −1) superword by the second part of Lemma 15, and hence we are back considering the word w from above.If there are fewer terms left, we can use the previous member of the progression which hits in the last position of a level-n superword, and determine the sequence of level-n superwords preceding it in the progression.Again, this determines the level-(2 n −1) superword by the second part of Lemma 15, and we are back in the case considered above, showing that L ≤ 2 n + 2.
Similarly, as mentioned above, we can rederive the value of A(2 n −1) stated in Theorem 10.
Proposition 17.For all n ∈ N, n > 1, we have that Proof.From Lemma 14, we already know that A(2 n −1) 2 n for n odd and A(2 n −1) 2 n + 2 for n even.
Let us first consider the case that n is odd.Since the superwords θ n (a) are antisymmetric under reflection, their first and last letters differ.This means that once our progression hits the first letter of a superword, it stops.Since addition by 2 n −1 means that the elements in the progression cycle through all positions in the superword, we obtain the upper limit A(2 n −1) 2 n , implying that A(2 n −1) = 2 n .Now consider the case of n even.Here, the superwords are symmetric under reflection, so we can have two elements of the progression within one superword.Assume that this occurs for a superword θ n (a) which has first and last letter a.If the progression continued to the left and to the right, the neighbouring superwords are determined by having the letter a at the next two positions, which force both of them to be a, and by symmetry this applies to either side of the superword, hence we obtain θ n (a)θ n (a)θ n (a)θ n (a)θ n (a).Clearly, the word aaaaa does not belong to the Thue-Morse language.This means that once the progression hits the first and last letter, it can only be extended by at most one either way, so we obtain A(2 n −1) 2 n + 4. That this bound is attained can be seen by looking at θ 2n (a), which by Lemma 14 contains a progression of length 2 n + 2 starting at ending with a superword θ n (a) that contain two elements of the progression.The superwords either side of θ 2n (a) can be both θ 2n (a), since aaa is in the Thue-Morse language.Hence the progression can be continued by one additional step to either direction, and the bound is attained.
The following two lemmas prove that there are no longer arithmetic progressions for differences up to powers of 2.
Lemma 18.Let n ∈ N + and 0 < k < 2 n−1 be both odd, and consider Proof.Assume that there exists an arithmetic progression with difference d of length L > 2 n .Since d is odd and hence coprime with 2 n , looking at elements of the progression within superwords of length 2 n will meet every position in a superword, including the position m = (k − 1)/2.However, the superwords of length 2 n for n odd are antisymmetric under reflection, so which shows that not both m and 2 n − 1 − m = m + d can be in the arithmetic progression, in contradiction to our assumption.This means that the progression cannot be longer than the number of rest classes modulo 2 n , which establishes the claim.
Lemma 19.Let n > 1 and let 2 < k < 2 n−1 be odd, and consider Proof.Assume there exists an arithmetic progression with difference d of length L > 2 n .Since d is odd and hence coprime with 2 n , looking at elements of the progression within superwords of length 2 n will meet every position in a superword.There are precisely k instances where two elements of the progression appear within the same the superwords of length 2 n , and hence the corresponding letters within the superwords have to agree.Since θ n (a) = θ n (a), both superwords have to agree on all these positions.As a consequence, for a ∈ {0, 1} and the superword θ n (a), the word consisting of its first k letters also has to appear at the end of the superword, so w = θ n (a) [2 n −k,2 n ) .Since k 3 and θ n (a) starts with aaa, the word w always contains a repeated letter and hence the level-1 superwords of length 2 are uniquely determined.This results in a contradiction because the length of w is odd, and the superword θ n (a) thus cannot end in w, since the level-1 superword boundaries do not match.Hence Note that, in contrast to Lemma 18, the result of Lemma 19 does not extend to the case k = 1, since in this case there is only one instance of a word containing two elements of the arithmetic progression, and for even n the superwords θ n (a) start and end on a, so this can (and does) appear in a long arithmetic progression.

Generalised Thue-Morse words
Consider the generalised Thue-Morse substitution rules θ p,q for p, q ∈ N + defined by [6] θ p,q : 0 → 0 p 1 q 1 → 1 p 0 q (3) where the original Thue-Morse substitution corresponds to p = q = 1.These binary bijective substitutions share many properties with the Thue-Morse substitution.In particular, we still have the 'bar-swap' symmetry θ n (a) = θ n (a).This implies that, once again, superwords are uniquely determined as soon as you know a single of its letters.Note that, however, the symmetry of superwords is only preserved when p = q, with superwords for even n being symmetric while those for odd n being antisymmetric under reflection.The other main change is that, rather than working modulo 2, we now have to work modulo Q := p + q.Also, it is clear from the substitution rule (3) that the language of θ p,q is (Q+1)-powerfree (in fact, (Q + ε)-powerfree for any ε > 0), generalising the cube-freeness (overlap-freeness) of the Thue-Morse case.We note that Parshina also considered generalised Thue-Morse words [24], but in her work the generalisation is to larger alphabets.Here, we consider a generalisation of the Thue-Morse sequence along the lines of [15,7,6], restricting ourselves to the binary case.
Since the rule θ 2 p,p is symmetric under reflection, the corresponding language is reflection symmetric too.However, if p = q, reflection swaps the languages defined by θ p,q and θ q,p .As we shall now show, each of these languages itself is not reflection symmetric.Lemma 20.For p = q, the languages L p,q and L q,p defined by the substitutions θ p,q and θ q,p , respectively, are different, so L p,q = L q,p .In particular, for a ∈ {0, 1}, the words a a p a q+1 belong to L p,q but not to L q,p .
Proof.It is easy to verify that aaa ∈ L p,q for any p, q ∈ N + .Now, θ p,q (aaa) = a p a q a p a q a p a q = a p a q a p a p+q a q , so a a p a q+1 ∈ L p,q for all p = q.By reflection, a a p a q+1 ∈ L q,p is equivalent to a q+1 a p a ∈ L p,q , which we are going to show now.
Noting that p = q and that L p,q can only contain strings of the type aa m a for m ∈ {p, q, p+q}, it follows by recognisability that a p a in a q+1 a p a has to be the start of the level-1 superword θ p,q (a).However, it then has to be preceded by the level-1 superword that ends in a, which is again θ p,q (a) = a p a q .This is clearly impossible, establishing the claim.
Remark 21.Similarly, considering the word aaa ∈ L p,q , with θ p,q (aaa) = a p a q a p a q a p a q = a p a p+q a q a p a q , we can show that a p+1 a q a ∈ L p,q , but is not a word in L q,p for p = q.Since all substitutions are binary bijective, it follows from [6] that they are not pure point diffractive, which implies that they do not have pure point dynamical spectrum either.Hence, by Theorem Yasushi2, they cannot contain infinitely long arithmetic progressions for any finite difference d.This means that we can again define the maximum length of an arithmetic progression.
Definition 22.For a positive integer d, let A p,q (d) denote the maximum length of a monochromatic arithmetic progression of difference d within the generalised Thue-Morse word.
As a direct consequence of the substitution structure and recognisability, we know that A p,q (Q n d) = A p,q (d) holds for all n ∈ N. In particular, this implies that A p,q (Q n ) = A p,q (1) = Q.We can again find long arithmetic progressions by considering a block substitution.Definition 23.Let Θ p,q be the block substitution on the alphabet {0, 1} defined by Θ p,q : 0 −→ 0 p 1 q 0 p 1 q . . .
The block substitution Θ p,q maps a single letter a to a Q × Q block of letters, which, when read line by line, coincides with the word θ 2 p,q (a).To illustrate the properties of Θ p,q , let us consider a couple of examples.
As for the Thue-Morse case, the image of a letter a has all entries a along the main diagonal of this block.However, as illustrated in Example 24, in general this is no longer the case for the other diagonal, except for the case that p = q, in which case the entries of this diagonal are all a.This means that we obtain the existence of long arithmetic progressions, as in the Thue-Morse case, for d = Q n + 1 for all values of p and q, while long arithmetic progressions for d = Q n − 1 may only exist if p = q.
Noting that Lemma 12 and Lemma 13 generalise in a straightforward manner, we obtain the following existence result for long arithmetic progressions in generalised Thue-Morse words, generalising the result of Lemma 14.
Lemma 25.For all n, p, q ∈ N + , Q = p + q, we have that Proof.This follows by the same line of argument as for the Thue-Morse case in the proof of Lemma 14.
The following results implicitly use the fact that, as in the Thue-Morse case, a level-n superword of θ p,q within any word in L p,q only occurs in certain ways.We obtain the following generalisation of Lemma 15.
Lemma 26.The word w = θ n p,q (a) with a ∈ {0, 1} and n > 1 occurs inside sufficiently long words in L p,q either as the level-n superword itself, or, in the case when p = q, in the centre of two level-n superwords θ n p,p (a)θ n p,p (a).In the latter case p = q, if w is followed by the letter a or preceded by the letter a (for n odd) or a (for n even), it is the level-n superword.
Proof.The proof is a straightforward generalisation from that of Lemma 15.The only difference is that, for p = q, the word w can only occur as the level-n superword, because the level-(n − 1) superwords are determined and with p = q they can only be combined to the level-n superword in one way.
Proposition 27.For all n, p, q ∈ N + , Q = p + q, n > 1, we have that Proof.From the proof of Lemma 25, we have an arithmetic progression of length Q n of the letter a in the word w = θ 2n p,q (a) = θ n p,q (a) p θ n p,q (a) q . . .θ n p,q (a) p θ n p,q (a) q , with the first and final letter being part of the progression (as before, because we are looking at an even number of substitutions, the word w starts and ends with the same letter).Note that, since the elements in the progression of difference Q n + 1 visit successive positions in superwords θ n p,q (a) in order, we know that, irrespective of where we start, once we hit the first letter of a superword θ n p,q (a) (which has to happen for any progression of length Q n ) the progression follows this same sequence, and the same backwards from when we hit the final position in a level-n superword.Using the same argument as in the proof of Proposition 16, we conclude that any progression of length L > Q n has to include this superword.Now consider how many letters can be added at either end of the progression of length Q n in the superword w.For Q > 2, all four possibilities for this superword being bordered by level-n superwords u = θ n p,q (a) or u = θ n p,q (a) can occur, so we need to consider w followed or preceded by either u or u.
If w is followed by u, it is followed by u p and we can extend the arithmetic progression by exactly p − 1 to the right.If it is followed by u, we cannot extend at all unless p = 1.For p = 1, we can extend by exactly one step.
If w is preceded by u (for n odd) or u (for n even), we cannot extend at all unless q = 1, in which case we can extend by precisely one step.If it is preceded by u (for n odd) or u (for n even), we can extend by exactly q − 1 steps to the left.
Choosing the combination with the longest available progression yields the result.
Note that for p = q = 1 we recover the result of Proposition 16.
Proposition 28.For all n, p ∈ N + , Q = 2p, n > 1, we have that Proof.From Lemma 25, we already know that long arithmetic progressions for Accordingly, such a long progression visits every position in level-n superwords.
For odd values of n, the superwords θ n p,p (b) start with b and end on b, so it is not possible to have the first and last letter in the same arithmetic progression.This implies that A(d) Q n , and hence For even values of n, all superwords θ n p,p (b) start and end in the same letter, and hence we have A(d) Q n + 2 as shown in Lemma 25, with the first and last letter in the superword w belonging to the arithmetic progression.What is left to consider is how far this can be extended on either side.The word w can be preceded and succeeded by level-n superwords u = θ n p,p (a) or u = θ n p,p (a), where for p = 1 one has to ensure cube-freeness.
If w is succeeded by u and hence by u p , it can be extended by exactly p − 1 steps.If is is succeeded by u, no extension is possible, unless p = 1 in which case you can extend by exactly one step.Due to symmetry of all these words for even n, the same argument applies at the other end, which completes the proof.
Proposition 29.For all n, p, q ∈ N + , with n > 2, p = q and Q = p + q, we have that A p,q (Q n −1) Q n .
Proof.Assume to the contrary that a long arithmetic progression of difference Q n − 1 and length L > Q n exists.Then this progression contains a level-n superword w = θ n p,q (a) with two instances of this progression, implying that the first and last letter of w agree.If n is odd, this is not possible, since w starts with a and ends on a.
If n > 2 is even, w starts and ends with θ 2 (a) = θ(a) p θ(a) q = (a p a q ) p (a p a q ) q .
Since by bijectivity a single letter determines the superwords, we can read off the sequence of words to the left and to the right of the word w with two instances of the progression, provided the progression extends.
Consider first the case p > 1. Assume that the progression continues to the right of w.As we are considering the difference d = Q n − 1, we are effectively reading the word w "backwards" to determine the sequence of superwords that is required.As mentioned above, w ends on θ 2 (a) which (since p > 1) contains the word a a p a p+q .According to Lemma 20, this word does not occur in L p,q , since we are considering the case that p = q.This implies that the sequence of superwords required to continue the progression for Q 2 steps to the right contains a subsequence that corresponds to the images of a word under θ p,q that is not in the language L p,q , which is a contradiction.This means that the progression cannot continue to the right for more than (q + 1)Q steps at most.
An analogous arguments holds if you assume that the progression extends to the left, showing that it can at most continue for pQ steps to the left.So the total length of the progression is at most If p = 1 and hence q > 1, we can use the same arguments as above, based on the word a p+1 a q a from Remark 21, which occurs within θ 2 p,q (a) in this case.So we have established the existence of long arithmetic progressions for all generalised Thue-Morse sequences for differences d = Q n + 1, as well as for differences d = Q n − 1 in the case that p = q.The obvious conjecture is that these are again the longest arithmetic progressions that you can find, up to the given difference, in these systems, which we state as a conjecture.
Conjecture 30.For all n, p, q ∈ N + , Q = p + q, n > 2, we have that q > 1 and p = q or n odd.
To establish this conjecture, we would need to generalise the results of Lemmas 18 and 19.This is not straightforward, though, because we now have to consider differences d = Q n − k where we may have that k is a non-trivial divisor of Q, in which case the argument that in a long arithmetic progression all rest classes modulo Q n appear is no longer applicable.
The following lemma details the relations within superwords arising from an assumed existence of long arithmetic progressions.
Lemma 31.Consider the language of the generalised Thue-Morse substitution θ p,q with p + q = Q.For n ∈ N, n > 1, and 1 < k < Q n−1 , set s = gcd(k, Q) and assume that s = Q.If there exists a long arithmetic progression of difference d = Q n − k and length L > Q n /s, the level-n superwords w = θ n p,q (a) have to satisfy w r+ℓs = w r+ℓs+d for some 0 r < s and for all 0 ℓ < k/s.
Proof.We have gcd(d, Q) = gcd(k, Q) = s and r ≡ d mod Q, so any such arithmetic progression of length L visits all positions a) for some letter a ∈ {0, 1} and for some 0 r < s.Whenever there are two instances within a superword, the corresponding letters have to agree for either superword, since θ n p,q (a) = θ n p,q (a).The condition for having two instances within a superword is r ′ + d < Q n , which means r ′ < k.With r ′ = r + ℓs, this results in ℓ < (k − r)/s, and since r < s this is equivalent to ℓ < k/s, establishing the claim.
Proposition 32.Consider the language of the generalised Thue-Morse substitution θ p,q for Q = p + q prime.Then, for n ∈ N, n > 1, and Proof.Since Q is prime, we have that gcd(k, Q) = 1.From Lemma 31 we know that, if there exists an arithmetic progression of length L > Q n , the superwords w = θ n p,q (a) have to satisfy this produces a contradiction, since the final Q letters of w [0,k) cannot be a valid level-1 superword, but w has to end on a level-1 superword.
Note that this lemma does not cover the differences d = Q n − k where 1 < k < Q, which we would need to establish the conjecture for prime values of Q (except for Q = 2 which brings us back to the Thue-Morse case).A partial result for min(p, q) = 1 is next, establishing Conjecture 30 for this class.
Proposition 33.Consider the language of the generalised Thue-Morse substitution θ p,q for min(p, q) = 1 and Q = p + q prime.Then, for n ∈ N + and any Proof.From Proposition 32, we know that the claim holds from k > Q.
If p = 1, the level-1 superwords are of the form aa q with a ∈ {0, 1}.This means that, for 1 < k < Q, the superwords w = θ n 1,q (a) start with w [0,k) = aa k−1 .Since 1 k − 1 < q, this string of letters cannot occur at the end of the superword w.
Similarly, if q = 1, the superwords w = θ n p,1 (a) start with w [0,k) = a k .Since k > q = 1, this string of letters cannot occur at the end of the superword w.

A result for general bijective substitutions
Clearly, our arguments for the existence of long arithmetic progressions observed for the Thue-Morse word and its generalisations considered in the previous section crucially depended on the particular arrangement of letters in the substitution rule.Even within the class of bijective substitutions (on an arbitrary alphabet), changing the order of letters will in general destroy the patterns we used above.However, if we restrict to binary bijective substitutions, we still have the following result.
Proposition 34.Let θ be a binary bijective substitution of length Q.Then, for any letter a, the superwords θ 2n (a) contain arithmetic progressions of distance Q n + 1 and length Q n .
Proof.For a binary bijective substitution, the superword θ 2n (a) consists of a sequence of Q n superwords θ n (a), θ n (a), arranged in the order of letters in θ n (a).As before, if you arrange these words in a square, all elements on the diagonal are the same letter a: whenever the n-th letter in θ n (a) is a, the superword in the n-th row is θ n (a) whose n-th letter is again a, and whenever it is a, the n-th row is the superword θ n (a), whose n-th letter is a = a.So we conclude θ 2n (a In the remainder of this section, we state a partial result for general bijective (and hence constant-length) substitutions on a general alphabet A.
Note that, due to linear repetitivity, any words that appear in the language defined by such a substitution occurs within any infinite word with a well-defined positive frequency.This means that we can alternatively formulate results in measure-theoretic terms.
Theorem 35.Let ̺ be a primitive, bijective substitution rule with expansion factor Q on a general alphabet A. Assume that there is a positive integer k such that the word a k+1 is not in the language of ̺ for any letter a ∈ A. Let v ∈ A Z be a repetitive fixed point of ̺ and let X v be the orbit closure of v, and denote the unique shift-invariant probability measure on X v by µ.Then the following statements hold.
(1) For some n > 0 and a ∈ A, the set (2) Suppose that a ∈ A, n > 0, and that C n,a has positive measure.Assume that n and Q are coprime.Then there is m 0 > 0 such that, for all m > m 0 , there are To prove the statement, assume that there is t ∈ Z such that v t = v t+d = • • • = v t+(L−1)d = a, and we will obtain a contradiction.Since d and Q m are coprime, there is s 0 ∈ {0, 1, . . ., Q m − 1} such that For each s ∈ {0, 1, . . ., k}, we have If d = Q m + n, the letter v t+(s 0 +s)d , coincides with a = v ℓ 0 +sn and these are at relatively the same position in the supertile of length Q m , and so the supertiles that include v t+(s 0 +s)d , s ∈ {0, 1, . . ., k}, are all the same type.However, this contradicts the assumption that b k+1 is not a legal word for any b ∈ A. Similarly, we obtain a contradiction for the case where d = Q m − n.
(3) By part (1), there are n > 0 and a ∈ A such that n and Q are coprime and C n,a has positive measure.Since ρ is binary, C n,b has positive measure for any letter b.By part (2), there is a positive integer m 0 such that for any m m 0 , there are no arithmetic progressions of an arbitrary letter in v with difference d ′ = Q m ± n and length L = Q m + k.Let m m 0 and s 0; we shall prove that there are no arithmetic progressions with difference d = Q m+s ± Q s n and length L = Q m + k.To this end, let us assume to the contrary that there is t ∈ Z such that Since t = t + d = • • • = t + (L − 1)d mod Q s , the letters v t , v t+d , . . .v t+(L−1)d are at relatively the same position in supertiles of length Q s .Due to bijectivity, this means that these supertiles are the images of the same letter.Hence there is t ′ ∈ Z such that However, this contradicts the above observation that there are no arithmetic progressions with difference d ′ and length L, completing the proof.

Conclusions and outlook
We investigated the occurrence of long arithmetic progressions in the Thue-Morse word and a class of generalised Thue-Morse words.Clearly, the existence of these long progressions of difference d and length L ≈ d was linked to the structure of the underlying substitution, corresponding to a diagonal in the induced block substitution carrying the same letter.If we change the order of letters in the substitution while retaining bijectivity, this property persists in the binary case, but will be lost for larger alphabets and, in general, such long progressions should not be expected to exist.We currently do not have any stronger bounds on the progressions for these cases, but it is likely that infinite series of progressions where the length L grows linearly with the difference d may not exist in this case.It would be interesting to quantify the behaviour for such systems.
Other potential generalisations include the investigation of other substitution sequences, either with more letters (see [24] for results on a different class of generalised Thue-Morse sequences) or for non-bijective substitutions, or quantitative versions of normality results [4,26,27,21].

Lemma 5 .
For all m > n ∈ N + and a ∈ {0, 1}, the word θ m (a) consists of a sequence of the two subwords w = θ n (a) and w = θ n (a), arranged according to the sequence that corresponds to θ m−n (b) with the letters b and b replaced by the words w and w.Proof.Let w = θ n (a) and w = θ n (a).Then, θ(w) = ww by the recursion (2), which is the same form as the Thue-Morse substitution, now on the alphabet {w, w}.Hence θ m (a) = θ m−n (θ n (a)) = θ m−n (w) is the sequence θ m−n (b) with b, b replaced by w, w.Proposition 6.The Thue-Morse word does not contain arbitrarily long monochromatic arithmetic progressions for any fixed difference d.

Definition 7 .
For a positive integer d, let A(d) be the maximum length of a monochromatic arithmetic progression of difference d within the Thue-Morse word.

Corollary 9 .
A(d) = 2 if, and only if, d = 2 n for some n ∈ N. Proof.Since A(2 n d) = A(d) for all n ∈ N and A(d) 3 for all odd d > 1 by Lemma 8, A(d) = 2 implies that d contains no odd prime factors.
has positive measure: µ(C n,a ) > 0. If µ(C n,a ) > 0 and n = Q s n ′ for some integers s 0 and n ′ > 0, then for some b ∈ A, we have µ(C n ′ ,b ) > 0.Moreover, if µ(C n,a ) > 0 and the images of ̺ m contain all letters in A, then µ(C Q m n,b ) > 0 for each letter b ∈ A.