On a Generalization of Thue Sequences

A sequence is Thue or nonrepetitive if it does not contain a repetition of any length. We consider a generalization of this notion. A j-subsequence of a sequence S is a subsequence in which two consecutive terms are at indices of difference j in S. A k-Thue sequence is a sequence in which every j-subsequence, for 1 j k, is also Thue. It was conjectured that k + 2 symbols are enough to construct an arbitrarily long k-Thue sequence and shown that the conjecture holds for k ∈ {2, 3, 5}. In this paper we present a construction of k-Thue sequences on 2k symbols, which improves the previous bound of 2k + 10 √ k. Additionally, we define cyclic k-Thue sequences and present a construction of such sequences of arbitrary lengths when k = 2 using four symbols, with three exceptions. As a corollary, we obtain tight bounds for total Thue colorings of cycles. We conclude the paper with some open problems.


Introduction
A subsequence of consecutive terms of a sequence S is called a block.A repetition in a sequence S is a subsequence ξ 1 . . .ξ t ξ t+1 . . .ξ 2t of consecutive terms of S such that ξ i = ξ t+i for every i = 1, . . ., t.A repetition thus consists of two identical repetition blocks and hence its length is always even.A sequence is called nonrepetitive or Thue if it does not contain a repetition of any length.Throughout the paper, the terms of sequences are not separated by commas as this is a usual notation in this area of combinatorics.
Repetitions and other regularities in sequences of symbols (words) take an important part in combinatorics on words (we refer the reader to [4] for a short introduction to this topic).The origins of their studies date back in 1906, when Thue [28] (see [3] for a translation) showed that using only three symbols one can construct an arbitrarily long sequence without a repetition.His famous work attracted a considerable attention and later many applications have been found in various fields of science [21].
Due to many unexpected applications that sequences without repetitions found in science, naturally a number of generalizations was presented.The most basic one is forbidding an appearance of k equal consecutive blocks, where already Thue showed that for k = 3, only two symbols suffice to construct an infinite sequence [28].A more restrictive generalization are the sequences avoiding abelian powers.An abelian k-th power is a sequence of k consecutive blocks, where in each block every symbol s appears the same number n(s) of times.Again, the most interesting case is when k equals 2. It was shown that 25 [13], five [22], and finally four [20] symbols suffice to construct an infinite sequence without abelian 2-repetitions.For k = 3 and k = 4, Dekking [12] showed that three and two symbols suffice, respectively.See e.g.[6] for more details on generalizations of Thue sequences.
In this paper we consider the following generalization of Thue sequences introduced by Currie and Simpson [11]: a (possibly infinite) sequence S is k-Thue (or nonrepetitive up to mod k) if every j-subsequence of S is Thue, for 1 j k.Here, a j-subsequence of S is a subsequence ξ i ξ i+j ξ i+2j . . ., for any i.Notice that a 1-Thue sequence is simply a Thue sequence.Currie and Simpson [11] introduced this notion in connection with nonrepetitive tilings, i.e. assignments of symbols to the lattice points of the plane such that all lines in prescribed directions are nonrepetitive.
As an example, consider a sequence a b d c b c, which is Thue, but not 2-Thue, since the 2-subsequence b c c is not Thue.On the other hand, a b c a d b is 2-Thue, but not 3-Thue.
A natural question arises what is the minimum number of symbols required to construct an arbitrarily long k-Thue sequence.In [11], the authors showed that four symbols are enough to create 2-Thue sequences and five symbols suffice for 3-Thue sequences of arbitrary lengths.The lower bound on the number of symbols needed to construct a k-Thue sequence of an arbitrary length is obvious; for a positive integer k, at least k + 2 symbols are required to construct such sequences.
In 2002 Grytczuk [16] conjectured that, in fact, the upper bound is equal to the lower bound for any k.

Conjecture 1 ([16]
).For any k, k + 2 symbols suffices to construct a k-Thue sequence.This conjecture is hence true for k = 2 and 3 and moreover, in [9], Currie and Moodie confirmed it also for k = 5.The case with k = 4 was considered by Currie and Pierce [10] using an application of the fixing block method.However, the upper bound for general k is still far from the conjectured.The bound of e 33 k established in [16] was substantially improved to 2k + O( √ k) in [17], which is currently the best known upper bound.
Motivated by the paper of Grytczuk et al. we present a construction of arbitrarily long k-Thue sequences using at most 2k symbols which improves the previous bound.We also introduce cyclic k-Thue sequences and establish the number of symbols required to construct a cyclic 2-Thue sequence of arbitrary length.
The paper is organized as follows: in Section 2, we improve the upper bound on the number of symbols needed to construct k-Thue sequences, in Section 3, we deal with cyclic 2-Thue sequences, and in Section 4 we briefly describe nonrepetitive colorings of graphs and present a result establishing tight bounds for total Thue colorings of cycles.Finally, in Section 5, we propose a conjecture, questions and possibilities for further work.

Upper bound on k-Thue sequences
In this section we improve the upper bound for the number of symbols needed to construct k-Thue sequences, with k 3, given in [17].
Theorem 3.For an arbitrary k 3, there is an arbitrarily long k-Thue sequence using at most 2k symbols.
Notice that our proof is constructive and provides a k-Thue sequence of a given length, while the proofs of upper bounds known so far just show an existence of such sequences., and denote the obtained sequence τ k .We refer to the blocks replacing α, β and γ as the α-block, β-block and γ-block, respectively, and denote these blocks replacement blocks.In Figure 1 the scheme of symbol adjacencies in τ 1 and τ k is depicted.
We will use the three claims below, to show that the sequence τ k is k-Thue.We denote the i-th term of τ k by ξ i .Claim 4. Let S be a j-subsequence of τ k , for 1 j k.If a term ξ of S is a b-symbol preceded or followed by an a-symbol, we can uniquely determine the replacement block in which ξ is contained.
Proof.By construction of τ k , it is clear that the distance (the number of terms) between an a-symbol a s and a b-symbol b t , for some fixed s and t, with 1 s, t k, within a replacement block is different in each of the replacement blocks, and so we can uniquely determine to which replacement block b t belongs.Moreover, this holds also if a s is in a subsequent replacement block of the replacement block of b t .Claim 5. Let R be a repetition in some j-subsequence of τ k starting with the symbol a s , where j < s k.Then there is a repetition in τ k starting with the symbol a s−j .Proof.Let ξ i ξ i+j . . .ξ i+(2r−1)j be a repetition of length 2r in a j-subsequence of τ k .Since every a-symbol is always at the same position within a replacement block, from ξ i = ξ i+rj it follows that ξ i−j = ξ i+(r−1)j and so the sequence ξ i−j ξ i ξ i+j . . .ξ i+(2r−2)j is also a repetition in τ k .
Claim 6.If there is a repetition starting with a b-symbol in some j-subsequence of τ k , there is also a repetition starting with an a-symbol.
Proof.Let ξ i ξ i+j . . .ξ i+(2r−1)j be a repetition of length 2r in a j-subsequence of τ k , where ξ i is a b-symbol b s for some 1 s k.We consider two cases regarding the term ξ i+(r−1)j .Suppose first that ξ i+(r−1)j is an a-symbol a t , 1 t k.Let p be the least positive integer such that ξ i+pj is an a-symbol.By Claim 4, the terms ξ i+(p−1)j and ξ i+pj uniquely determine the corresponding replacement block, i.e. the block in which also ξ i is contained.Notice that the terms ξ i+(r+p−1)j = ξ i+(p−1)j and ξ i+(r+p)j = ξ i+pj determine the same replacement block in which similarly ξ i+rj = b s is contained.Since ξ i+(r−1)j = a t , it follows that also ξ i−j = a t and hence ξ i−j ξ i ξ i+j . . .ξ i+(2r−2)j is also a repetition.
Suppose now that there is some repetition R in a j-subsequence of τ k , with 1 j k.Notice that since each replacement block has length 2k, consecutive a-symbols (resp.bsymbols) in R correspond to one replacement block.By Claim 6, we may assume that the first term of R is an a-symbol ξ and by Claim 5, we have that ξ = a i for 1 i j.It follows that the last term of the first repetition block of R (and also of R) is a b-symbol.Thus, by Claim 4, we infer that the replacement blocks of both repetition blocks in R are identical, which means that there is a repetition in τ 1 also, a contradiction.Hence, τ k is indeed k-Thue.

Cyclic 2-Thue sequences
In this section we introduce the notion of cyclic Thue sequences and their generalization, cyclic k-Thue sequences, where for k = 2 we establish tight bounds on the number of symbols needed to construct sequences of arbitrary lengths.Cyclic Thue sequences were first investigated by Currie [7], who was motivated by the question of Alon et al. [1] asking which cycles can be Thue colored by three colors.
Let S = ξ 1 . . .ξ be an arbitrary sequence.A sequence S is a conjugate of S if there is some integer i such that S = ξ i . . .ξ ξ 1 . . .ξ i−1 .A sequence is cyclic Thue if all its conjugates are Thue (we adopted this definition from [7]).
The definition of cyclic k-Thue sequences is analogous.A cyclic j-subsequence is a subsequence of S in which every two consecutive terms appear at indices i and i + j (mod ), for some integer i, and every term from S appears at most once.Hence, for even the length of any cyclic 2-subsequence is at most 2 , while for odd, its length is at most .A sequence S is cyclic k-Thue if every cyclic j-subsequence of S is Thue, for 1 j k.One can imagine the terms of a cyclic sequence on a circle such that the last term is followed by the first term (see Fig. 3 for an example).
Observe that a cyclic sequence consisting of at least four terms requires at least four symbols in order to be 2-Thue.Moreover, for cyclic 2-Thue sequences of lengths 5, 7, and 11 at least five symbols are needed.Proof.Let S = ξ 1 . . .ξ be a cyclic 2-Thue sequence of length ∈ {5, 7, 11}.We consider each of the three cases separately assuming that S contains four distinct symbols a, b, c, and d, obtaining a contradiction.= 5.Clearly, every symbol appears at most /3 times in a cyclic 2-Thue sequence of length , since the terms at distance at most 2 have distinct symbols assigned.Hence, all terms must be distinct in S, a contradiction.= 7.Every symbol appears at most twice in a seven-term cyclic 2-Thue sequence.Without loss of generality, we may assume that a appears once, while the other three symbols appear twice in S. We may assume that ξ 1 = c, ξ 2 = a, and ξ 3 = b.Then, ξ 4 = ξ 7 = d, ξ 5 = c, and ξ 6 = b.But then there is a repetition ξ 6 ξ 1 ξ 3 ξ 5 in a cyclic 2-subsequence of S, a contradiction.On the other hand, a sequence abcabde constructed by five distinct symbols is cyclic 2-Thue.
= 11.Any symbol of S occurs at most three times.Hence, three symbols appear three times and one, say d, appears twice.Assume that ξ 1 = d.Since the length of a 2-Thue sequence on three symbols is at most 5, the second occurrence of d is determined up to symmetry.Thus, assume d is at index 7.Moreover, a 2-Thue sequence of length 5 on three symbols has a unique ordering up to isomorphism, so we may assume that ξ 1 . . .ξ 7 = dabcabd.The symbol c appears once at index 4 and the other two occurrences of this symbols are at index 8 and 11.Therefore, S = dabcabdcxyc.There are two possibilities: xy = ab or xy = ba.In the former case a repetition cbcb appears in a 2-subsequence of S, and in the latter case there is a repetition adbadb in a cyclic 2subsequence, a contradiction.Again, there exists a cyclic 2-Thue sequence abcabdcbace on five symbols.
Before we prove the main theorem of this section, we present an alternative construction of 2-Thue sequences using a similar approach as in Section 2. We use such constructed sequences to construct cyclic 2-Thue sequences.Consider an arbitrary Thue sequence on an alphabet {α, β, γ} and insert a symbol δ between any two consecutive symbols α and γ (or γ and α) to obtain a new sequence τ 1 .By Lemma 8 below, τ 1 is also Thue.
First, we present some additional notation used in the sequel.By S(p 1 , p 2 ) we denote a subsequence of a sequence S = ξ 1 . . .ξ n starting (at index p 1 ) with the term ξ p 1 and ending (at index p 2 ) with the term ξ p 2 for some indices p 1 and p 2 .
Using the property that there is no pair of adjacent terms α and γ nor a pair of adjacent terms β and δ, we obtain the following lemma.Lemma 9.For every odd integer k there exists a subsequence of τ 1 of length k starting and ending with the same symbol.
Proof.Let k be an arbitrary odd integer.Suppose, for a contradiction, that every subsequence of τ 1 of length k starts and ends with a different symbol.Let T = ξ i+1 . . .ξ i+k be a subsequence of τ 1 of length k.Without loss of generality we may assume that T starts with α.Let j ∈ {i + 1, . . ., i + k}.Observe that for every j, with j ≡ i + 1 (mod 2), we have ξ j , ξ j+k−1 ∈ {α, γ}, and for j, where j ≡ i (mod 2), we have ξ j , ξ j+k−1 ∈ {β, δ}.By the initial assumption, we also have that ξ j = ξ j+k−1 for every j.However, ξ j = ξ j+2k−2 for every j and hence there is a repetition of length 4k − 4 in τ 1 , a contradiction.Now, replace each of the symbols α, β, γ, and δ in τ 1 with the four-term blocks abcd, abdc, bacd, and badc, respectively.We denote the obtained sequence by τ 2 (see Figure 2 for the scheme of symbol adjacencies in τ 1 and τ 2 ).
Below, we list two basic properties of τ 2 .Both of them are obvious by the construction of τ 2 .Property 2. In τ 2 the symbol pairs cd and dc appear alternately, i.e. ξ i ξ i+1 = cd for i ≡ 3 (mod 8) and ξ i ξ i+1 = dc for i ≡ 7 (mod 8).
Now we are ready to show that the sequence τ 2 is 2-Thue.
Proof.First, we show that τ 2 is without a repetition by considering two cases.In the former, we show that there is no repetition of length at most 8 in τ 2 (this case is discussed in Claim 11).
Claim 11.There is no repetition of length at most 8 in τ 2 .
Proof.By Property 1, the same symbol appears after at least two other symbols, so repetitions of lengths 2 or 4 are not possible.Moreover, Property 1 implies that every block of length 5 in τ 2 contains four distinct symbols, hence there is no repetition of length 6 in τ 2 .Obviously, there is no repetition of length 8 in τ 2 due to Property 2.
In the latter case, we show that there is no repetition of length greater than 8.The proof is divided into several subcases regarding the length of an eventual repetition and the position of its starting term.We start with the following claim.Claim 12.There is no repetition of length 2t ≡ 2 (mod 4) in τ 2 .
Proof.Since the symbols in τ 2 come in pairs, a with b and c with d, every block of a repetition must be of even size.
Let k and t be positive integers and suppose there is a repetition R = ξ k+1 . . .ξ k+t ξ k+t+1 . . .ξ k+2t in τ 2 of length 2t starting at the position k + 1 such that ξ k+i = ξ k+t+i for i = 1, . . ., t.We distinguish several cases regarding the position of the starting term of R in τ 2 .First, consider the values of t.By Claim 12, t is not odd, and moreover t ≡ 2 (mod 4), since the second block would start with a symbol from the second pair.Hence t ≡ 0 (mod 4).Now, we consider four subcases regarding the values of k.
• k ≡ 0 (mod 4).Since t ≡ 0 (mod 4) an appearance of a repetition R in τ 2 implies that there is also a repetition in τ 1 , a contradiction.
• k ≡ 1 (mod 4).By Property 1, the term ξ k+1 = ξ k+t+1 of R is a or b and the previous term ξ k = ξ k+t is the other symbol of a or b.Therefore there is a repetition R in τ 2 of length 2t starting with the term ξ k .According to the former case we obtain a contradiction.
• k ≡ 3 (mod 4).As in the previous case, we obtain a repetition of length 2t starting with the term ξ k+2 , a contradiction.
It follows that τ 2 is a Thue sequence.
To show that the sequence τ 2 is 2-Thue it remains to prove that every 2-subsequence is nonrepetitive.Consider a subsequence τ odd (τ even ) formed by the terms at odd (even) positions in τ 2 .Clearly, there is no repetition of length 2 and 4 in τ odd .Now suppose that there is a repetition R odd = {ζ n } k+t k+1 in τ odd of length t, t 6.Notice that the terms at even positions are uniquely determined by Property 1. Therefore if there is a repetition in τ odd , there is also a repetition R even = {ζ n } k+t+1 k+2 in τ even .Consequently, these facts lead to a contradiction, since having a unique determination of the terms at odd and also at even positions, implies that there is also a repetition in the whole sequence τ 2 of length 2t starting at the position k + 1.This establishes the theorem.Now, we are ready to prove the main theorem of this section.
Proof.In the proof, we proceed as follows.First, we present a construction of sequences of specified lengths obtained from subsequences of the sequence τ 2 described above and show that such sequences are cyclic 2-Thue.Then we show that we can construct a cyclic 2-Thue sequence of any length.
By Lemma 9, there exists a subsequence S = ξ 1 . . .ξ of τ 2 of length starting and ending with equal blocks abdc for every = 8t + 4, with t 1. Moreover we can assume that ξ 5 ξ 6 ξ 7 ξ 8 = bacd and by Property 2 we have ξ −5 ξ −4 = cd.Let S c be the sequence obtained by replacing the first term a in S with the symbol c, and the last term c with the symbol a (see Figure 3).Now, we show that S c is cyclic 2-Thue.Suppose the contrary, that there is a repetition R in some cyclic j-subsequence of S c , for j ∈ {1, 2}.It is easy to verify that the subsequence S c ( − 3, 4) is 2-Thue.Furthermore, observe that R is not within any j-subsequence of S c (2, − 1), since its terms are the same as the terms at the same positions in S, which is 2-Thue.Hence, R contains at least one of the terms at indices 1 and and some of the terms of S c (5, − 4).
When j = 1, at least one of the subsequences S c (1, 5) and S c ( − 4, ) is contained in R. In the former case, R contains a block cbd, which is unique in S c by Property 1; in the latter case, there is a unique block bda, a contradiction.If j = 2, then the repetition R contains the terms of at least one pair of indices − 2 and , − 1 and 1, and 2, or 1 and 3. Similarly as above, these terms represent unique blocks ba, dc, ab or cd, a contradiction implying that S c is cyclic 2-Thue.Notice that in both cases we assume that the unique blocks appear in one repetition block of R, since otherwise, if a unique block, say ab, is divided and appears in both repetition blocks of R, then another block, in this case ba, appears entirely in one repetition block of R.
In what follows, we show that we can modify the above sequences such that we obtain cyclic 2-Thue sequences of arbitrary lengths.Consider a cyclic sequence S c of length = 8t + 4 for some t constructed as above.We extend the sequence S c by appending a block of symbols A k from Fig. 4, obtaining a sequence S c k , for k ∈ {4, 9, 10, 11, 13, 14, 15}.Denote the indices of the terms of S c k corresponding to the terms of A k by + 1, . . ., Figure 4: A list of blocks of symbols to be appended at the end of S c .
We show that a sequence S c k is cyclic 2-Thue, for every k.Similarly as in the case above, suppose that there is a repetition R k in some cyclic j-subsequence of S c k , for j ∈ {1, 2}.
the electronic journal of combinatorics 22(2) (2015), #P2.33 As above, there is no repetition in any j-subsequence of S c k (2, − 1) and, since the blocks cdabdaA k cbdcba are 2-Thue for every k, R k is not contained in any j-subsequence of S c k ( − 5, 6) (which is of length k + 12).Now, we consider two cases regarding the value of j.
Suppose that R k is a subsequence of some 1-subsequence of S c k .Then, by the observation above, it must contain the terms of S c k (1, 3) (i.e.cbd) or of S c k ( − 2, ) (i.e.bda).First, assume that at least one of the two blocks is contained in one repetition block of R k .By Property 1 and the choice of A k 's, both blocks are unique in all the sequences S c k , a contradiction.Now, we may assume that none of the blocks cbd and bda is contained in one repetition block of R k .Hence only one of them is completely contained in R k .This implies that one repetition block is entirely within S( −1, 2), while the second is entirely within S(2, −1).By Properties 1 and 2, the former and the latter block are not the same, a contradiction implying that all the sequences S c k are cyclic Thue.We may thus assume that R k is a subsequence of some cyclic 2-subsequence of S c k .By the same argumentation as above, at least one of the four triples of indices (1, 3, 5), ( − 4, − 2, ), ( − 3, − 1, + 1) or ( + k, 2, 4) appears in R k .Recall that when k is odd (then also + k is odd), a cyclic 2-subsequence might be of length + k, whereas in cyclic sequences of even lengths there are two disjoint maximal cyclic 2-subsequences.
As in the previous case, the triples of indices represent unique blocks cdb, dba, adc and abc, which means that R k contains entirely exactly one of them, and clearly not in one repetition block.This implies that one repetition block is entirely within S( − 2, 3), while the second is entirely within S(2, − 1).Notice that from this it follows that in R k only the terms with the same parities of indices in S c k appear.Consider now how the four blocks can be divided between the two repetition blocks of R k .
Each of the four blocks can be divided in two ways; we consider them separately.First, if the block cdb (resp.dba, adc, abc) is divided so that cd (resp.ba, dc, ab) appears in one repetition block, the same block cannot appear in the other repetition block by Property 1.Hence, we may assume that cdb (resp.dba, adc, abc) is divided so that db (resp.db, ad, bc) appears in one repetition block.Notice that db does not appear in any 2-subsequence of S( − 2, 3), while ad appears twice but at the indices of different parities.Only bc appears also at the indices of the same parities (in A 13 ), but it is followed by different symbols as bc at the indices 2 and 4. Hence, we may conclude that R k does not exist and that S c k is indeed cyclic 2-Thue for every k.By Lemma 7, there are no cyclic 2-Thue sequences on four symbols of lengths 5, 7 and 11.The sequences of the remaining lengths that cannot be obtained by our construction, i.e. = 8t + 4 + k, for t 1 and k ∈ {0, 4, 9, 10, 11, 13, 14, 15}, are presented in Table 1

On nonrepetitive colorings of graphs
The notion of repetitive sequences has been strongly adopted by the graph theory.It seems that Currie [5,8] was the first to consider nonrepetitive sequences in graphs.In 2002, Alon et al. [1] generalized the problem to edge-colorings of graphs.A coloring of the edges of a graph G is called nonrepetitive if the sequence of colors on any path in G is nonrepetitive.The authors denote the minimal number of colors needed for such a coloring the Thue number of G.
That work initiated the study of a number of colorings of graphs with analogous constraints; together with already mentioned edge colorings and classical colorings of vertices, both colorings were defined also with restriction to faces and named facial nonrepetitive edge or vertex coloring regarding nonrepetitive sequences of colors of consecutive vertices or edges on the boundary of any face in plane graphs (see [19] and [2]).For more results on graph colorings we refer the reader to an early survey of Grytczuk [15].Additionally, a list version of this problem was studied for paths [18], trees [14], and plane graphs [23,24,26] where in the latter two the entropy compression method was used.
Recently, Schreyer and Škrabu ľáková [25] introduced a new type of a nonrepetitive coloring of graphs, a sort of total colorings: a weak and a (strong) total Thue coloring.A weak total Thue coloring of a graph G is a coloring of vertices and edges such that the color sequences of consecutive vertices and edges of every path in G are nonrepetitive.For a (strong) total Thue coloring of G an additional condition must be satisfied: the induced vertex-coloring and edge-coloring of G are also nonrepetitive.The minimum number of colors required in these colorings are called the weak total Thue chromatic number and the (strong) total Thue chromatic number of a graph G, respectively, and denoted by π τw (G) and π τ (G), respectively.Among other results, they showed that the total Thue chromatic number of a graph is at most 15∆ 2 (G) and the bound increases to 18∆ 2 (G) in the list version of the problem.
Note that an immediate corollary of the result of Currie and Simpson [11] is the fact that the total Thue chromatic number of any path of length at least 4 is equal to 4. In [25], the bounds for cycles were also presented.
As a Corollary of Theorem 13, we obtain also the tight bounds for total Thue coloring of cycles, improving Proposition 14.
Notice that we need a sequence of length 2n to induce a coloring of the vertices and edges of a cycle on n vertices.

Discussion
In this paper we presented a construction of k-Thue sequences using 2k symbols.We believe that our method could be improved to obtain better or even tight upper bounds.However, Conjecture 1 is still wide open for k = 4 and k 6.While there was some work already done on the upper bounds for constructing linear sequences, the results in Section 3 seem to be the first in this area.For cyclic k-Thue sequences we sometimes need an additional symbol already in the cases with k = 1 and k = 2.Even more, for a cyclic k-Thue sequence of length 2k +1, we always need 2k +1 symbols.On the other hand, from the construction used in proof of Theorem 3 one can deduce that for the lengths = 2kn, cyclic k-Thue sequences on 2k symbols exist: instead of an arbitrary Thue sequence τ 1 , we just take a cyclic Thue sequence on three symbols of length n.However, if the length is big enough, we conjecture the following.Conjecture 16.For every k there exists an integer k such that at most k + 2 symbols are needed to construct a cyclic k-Thue sequence of length k .
If the conjecture is true, what are the lengths, for which k + 2 symbols do not suffice?Another interesting problem in this area is study of growth properties of Thue sequences (see [27] for a survey).An analogous question can be asked for k-Thue sequences.
Question 17.What is the number of k-Thue sequences of length n on k + 2 symbols?
In a k-Thue sequence we forbid repetitions in all j-subsequences, for 1 j k.One can naturally define the following weaker version.A weak k-Thue sequence is a Thue sequence in which every k-subsequence is also Thue.Intuitively, the condition is at most as restrictive as the condition for 2-Thue sequences, i.e. there is at least as many weak k-Thue sequences as 2-Thue sequences on four symbols (note that every weak 2-Thue sequence is also 2-Thue).Thus one may expect that, for k big enough, three symbols suffice to construct a weak k-Thue sequence.Computer search shows that there are no weak k-Thue sequences of arbitrary length on three symbols for k ∈ {2, . . ., 12, 14, 15, 16, 20, 22}.Question 18.Is there a positive integer k large enough such that three symbols suffice to construct an infinite weak k-Thue sequence?Grytczuk et al. [17] considered the following problem concerning infinite sets of forbidden differences.Let K be a fixed (possibly infinite) set of positive integers.A Knonrepetitive coloring is a coloring of the integers in which every arithmetic progression with common difference in K forms a nonrepetitive sequence.They denoted by π(K) the minimum number of colors needed for K-nonrepetitive coloring of Z. Clearly, by Theorem 3, π(K) is at most 2k for finite sets K, where k is the maximum element of K.For infinite sets the authors gave an Erdős type conjecture that π(K) is finite also for every lacunary set K, where a set K = {k 1 < k 2 < . . .} is lacunary if there is a real number δ > 0 such that k i+1 k i > 1 + δ for all indices i.Notice that the notion of weak k-Thue sequences is just a special case of the above; namely, taken K = {1, k} the problems are equivalent.

Lemma 7 .
Every cyclic 2-Thue sequence of length 5, 7, or 11 is constructed by at least five symbols.

Property 1 .
In τ 2 the symbols a and b appear only at positions 1 or 2 (mod 4) and the symbols c and d appear only at positions 0 or 3 (mod 4).

Figure 3 :
Figure 3: A cyclic 2-Thue sequence S c obtained by replacing the first and the last term of S.

Table 1 :
. This completes the proof.Cyclic 2-Thue sequences of lengths that cannot be obtained by the above procedure.