Maximum order complexity of the sum of digits function in Zeckendorf base and polynomial subsequences

Automatic sequences are not suitable sequences for cryptographic applications since both their subword complexity and their expansion complexity are small, and their correlation measure of order 2 is large. These sequences are highly predictable despite having a large maximum order complexity. However, recent results show that polynomial subsequences of automatic sequences, such as the Thue--Morse sequence, are better candidates for pseudorandom sequences. A natural generalization of automatic sequences are morphic sequences, given by a fixed point of a prolongeable morphism that is not necessarily uniform. In this paper we prove a lower bound for the maximum order complexity of the sum of digits function in Zeckendorf base which is an example of a morphic sequence. We also prove that the polynomial subsequences of this sequence keep large maximum order complexity, such as the Thue--Morse sequence.


Introduction
Feedback shift register (FSR) sequences are used for many cryptographic applications such as pseudorandom number generators for stream cipher cryptosystems, see [10]. A binary n-stage feedback shift register (FSR) is a mapping F from F n 2 to F n 2 of the form F : (x 0 , x 1 , . . . , x n−1 ) → (x 1 , x 2 , . . . , x n−1 , f (x 0 , x 1 , . . . , x n−1 )), where f is a function from F n 2 to F 2 . Consider the binary sequence S = (s i ) i≥0 whose first n terms are given and the remaining terms are uniquely determined by the recurrence relation s i+n = f (s i , . . . , s i+n−1 ), i ≥ 0.
The sequence S is called the output sequence of the FSR. An output sequence of a short FSR is considered weak in cryptographic applications. In order to determine this shortness for an infinite sequence S, Jansen [12,13] introduced the notion of N th maximum order complexity of S, denoted as M (S, N ), which is the length of the shortest FSR that generates the first N elements of S. If the mapping F is a linear transformation, then the FSR is called a linear feedback shift register (LFSR). This leads to the notion of the linear complexity profile of S denoted as L(S, N ). We have obviously M (S, N ) ≤ L(S, N ). The sequence (M (S, N )) N is called the maximum order complexity profile of S and M (S) = sup N ≥1 M (S, N ) is called the maximum order complexity of S.
A sequence S is said to have a perfect linear complexity profile if L(S, N ) = n 2 , n ≥ 1.
An explicit construction of sequences with perfect linear complexity profile is given in [1]. These are known under the name of apwenian sequences (see [17]). Diem [7] observed that these sequences and sequences based on function expansion into expansion series can be efficiently computed from relatively short sequences. This leads to the notion of expansion complexity, denoted as E(S, N ), see Definition 2 below for more details. It was proved by Mérai, Niederreiter and Winterhof [16] that the expansion complexity and the linear complexity of an infinite sequence satisfy E(S, N ) ≤ L(S, N ) + 1.
A natural question is to ask about the mutual relationship between the maximum order complexity and the expansion complexity. It is known that these two complexities have expected behavior log N for the maximum order complexity, see [12,20], and √ N for the expansion complexity, see [17,Theorem 6.2] and [16]. This suggests that maximum order complexity is smaller than the expansion complexity. However, the Thue-Morse sequence has a large maximum order complexity and a bounded expansion complexity. Thus in order to determine the unpredictability of a sequence, both the expansion complexity and the maximum order complexity are useful and needed.
In recent years, research focused in particular on automatic sequences, i.e. sequences that are generated by a deterministic finite automaton. These sequences are not suitable for cryptographic applications as we will state later. Nevertheless, their pseudorandom behavior changes radically when the sequence is rarefied along special subsequences such as polynomial subsequences. One can extend the definition of automatic to morphic sequences which is an again larger class.
The aim of the present article is to study pseudorandomness of some morphic sequences and its polynomially rarefied subsequences. We first introduce several measures of complexity (Section 1.1) and illustrate their behavior with a simple example. We then introduce automatic and morphic sequences (Section 1.2) and give an overview about the results known for their measures of complexity. We then indicate our main results of this paper (Section 1.3).
1.1. Measures of complexity. Let us first introduce some measures of complexity that we will focus on in the present paper.
Definition 1 (Maximum order complexity). Let N be a positive integer with N ≥ 2, and S = (s n ) n≥0 be a sequence over {0, 1} with (s 0 , . . . , s N −2 ) = (a, . . . , a) for a = 0 or 1. The N th maximum order complexity M (S, N ) is the smallest positive integer M such that there is a polynomial f ( A sequence with small maximum order complexity is not suitable for cryptographic applications. Indeed, such a sequence can be built with relatively short blocks of consecutive terms. However, a sequence with large maximum order complexity can still be predictable, as it is known for the Thue-Morse sequence, see [15,28]. Note also that the largest possible order of magnitude of M (S, N ) is N and the expected value of M (S, N ) is log N , see [12,20].
The maximum order complexity has been studied by several authors, for general results see [11,12,13,20,31] or [21,27,28,29] for applications to some particular sequences such as the Thue-Morse sequence or the Rudin-Shapiro sequence. From a computational perspective, Jansen [12,Proposition 3.17] showed how Blumer's DAWG (Direct Acyclic Weighted Graph) algorithm [3] can be used to compute the maximum order complexity in linear time and memory. In the last section of this paper, we use DAWG algorithm to formulate some conjectures (Section 3.2). Diem [7] introduced the expansion complexity of a sequence as follows.
Definition 2 (Expansion complexity). Let N be a positive integer, S = (s n ) n≥0 be a sequence over {0, 1} and G S (x) its generating function defined by The N th expansion complexity E(S, N ) is defined as the least total degree of a nonzero polynomial h( if s 0 , . . . , s N −1 are not all equal to 0, and E(S, N ) = 0 otherwise.
A truly random sequence has expected value E(S, N ) of order N 1/2 , see [17]. Binary, and more generally, p-ary automatic sequences are not good pseudorandom sequences since their expansion complexity satisfies E(S, N ) < +∞ by Christol's theorem, see [6]. In fact, automatic sequences generated by a finite automaton do not have sufficiently many different factors of a fixed length.
The subword complexity, denoted by p S (k), counts how many different subwords of fixed length k the sequence contains. It can again serve as a measure of pseudorandomness. A sequence S over {0, 1} is normal if for every k ≥ 1 and for any block of length (b 0 , . . . , b k−1 ) ∈ {0, 1} k , we have One can associate to a binary sequence a symbolic dynamical system based on the shift on {0, 1} N . The topological entropy of such a dynamical system is lim k→+∞ , where log 2 denotes the base 2-logarithm. A sequence with 0 topological entropy is said to be deterministic and it should not provide a pseudorandom sequence since such a sequence has a small subword complexity, see [23].

1.2.
Automatic and morphic sequences. Let k ≥ 2 and Σ be a finite alphabet. We denote by Σ * the set of all finite or infinite words over Σ. A morphism f is a mapping f : Σ * → Σ * satisfying f (uv) = f (u)f (v) for all words u and v. A morphism is said to be k-uniform if |f (x)| = k for all x ∈ Σ, where |x| is the length of the word x. If there is b ∈ Σ such that f (b) starts with b, i.e. f (b) = bu for some u ∈ Σ * , we say that f is b-prolongable. In this case, let us denote f ω (b) the fixed point of f given by f ω (b) = bf (u)f 2 (u) . . . Definition 3 (Automatic and morphic sequences). Let S be a sequence over an alphabet Σ. S is morphic if S = π(f ω (b)) where f : Σ * → Σ * is a b-prolongeable morphism and π : Σ → ∆ is a morphism, named coding. S is said k-automatic if f is k-uniform.
For equivalent definitions of automatic sequences, we refer to [2]. An emblematic example of automatic sequence is the Thue-Morse sequence, or Prouhet-Thue-Morse sequence, independently introduced by Thue [30], Morse [18] and Prouhet sixty years before [22] . This sequence appears in many different fields of mathematics, see [14], and is still an important object of recent work.
The Thue-Morse sequence is 2-automatic and the corresponding morphism is The Thue-Morse sequence has a large maximum order complexity, see [28], but this sequence is far from being pseudorandom. Indeed, it is well-known that The behavior of this sequence regarding the defined pseudorandomness measures changes when this sequence is rarefied along specific subsequences. Drmota, Mauduit et Rivat [8] showed that the Thue-Morse sequence along squares is normal and Moshe [19] showed that the polynomial subsequences of degree d ≥ 2 of the Thue-Morse sequence have an exponential subword complexity. Sun and Winterhof [27] and Popoli [21] showed that the maximum order complexity of the Thue-Morse sequence along polynomial subsequences remains comparatively large. A large maximum order complexity is desired, however, it should be noted that it should be not too large since the correlation measure of order 2 gets large in that case (see [12,Proposition 3.1]).
Furthermore, these polynomial subsequences are no longer automatic sequences, see [2, Theorem 6.10.1], and their expansion complexity is no longer bounded by Christol's theorem. These statements mean that the polynomial subsequences of the Thue-Morse sequence are better candidates for cryptographic applications than the original sequence.
In order to generalize the investigation to other morphic sequences and sum of digits function, let us introduce the Zeckendorf base sum of digits function, which is related to the Fibonacci sequence (see [2, Theorem 3.8.1], [32]).
Definition 5 (Zeckendorf base). Let F = (F n ) n≥0 be the Fibonacci sequence with initial values F 0 = 0, F 1 = 1 and F n+2 = F n+1 + F n for all n ≥ 0. Let us denote ϕ = (1 + √ 5)/2 the golden ratio. Each integer n can be represented uniquely by Since F n = ϕ n √ 5 + 1 2 for n ≥ 0, the index n(a) of the largest Fibonacci number that is not greater than an integer a > 1 is log(a √ 5+1/2) log(ϕ) . We call n(a) − 1 the length of a.
Thus we can define the sum of digits function in Zeckendorf base by s Z (n) = i≥0 ε i (n), see [9,24,26] or sequence A007895 in On-Line Encyclopedia of Integer Sequences (OEIS) for discussions on this sequence. We denote by S Z the sequence defined by S Z = (s Z (n) mod 2) n≥0 , an analog of the Thue-Morse sequence. It is known that S Z is a morphic sequence, see for example [4, p.14] or [2,Examples 7.8.2,7.8.4]. An example of the corresponding morphism and coding is f : and g : Thus, the sequence modulo 2 is obtained by iterating f on the letter a and recoding with g : S Z = 011101001000110001011 . . . This sequence is not automatic, see [9,Remark 1]. Indeed the authors show that the k-kernel is infinite for every k, see [2] for more details on equivalent definitions of automatic sequences. This implies that the expansion complexity of S Z is not bounded, since this sequence is not automatic, and motivates our study of this sequence. In fact, morphic non-automatic sequences are better candidates for cryptographic applications regarding this complexity. However morphic sequences have subword complexity at most bounded by a quadratic function, see [2,Corollary 10.4.9], and their associated dynamical system has 0 topological entropy, see [23,Corollary V.20] for an alternative proof.
Example 1 (Carry propagations in Zeckendorf base). In Zeckendorf base, the carry propagations work in a different way than in the usual q-base with q ∈ N and q ≥ 2. Indeed, since we cannot have two consecutive 1-bits, the carry is "transversal" by the Fibonacci recurrence relation and if we have two 1-bits on the same column we use the formulas 2F j = F j+1 + F j−2 for all j ≥ 2 in order to get an admissible expansion. For example, 5 = F 5 , 6 = F 5 + F 2 and 5 + 6 = 11 = F 6 + F 4 as shown by the following calculation: In this kind of calculation, we first do not take into consideration the restriction of non-adjacent terms then we normalize to obtain the Zeckendorf representation with non-adjacent terms. This simple example shows that the carry propagation is on both sides of the expansion since 2F j = F j+1 + F j−2 for all j ≥ 2. We will see later that this specific carry propagation, compared to the usual q-base carry propagation, will play an important role in our investigation.
As the sum of digits function for the usual q-base, s Z is a subadditive function, i.e. for any integers n 1 , n 2 ≥ 0 we have s Z (n 1 + n 2 ) ≤ s Z (n 1 ) + s Z (n 2 ), see [26,Proposition 1]. Consider the Zeckendorf expansion of n 1 and n 2 , Without loss of generality suppose that k 1 ≤ k 2 . We say that n 1 and n 2 are non-interfering if k 2 − K 1 ≥ 2. This means that non-interfering integers have digital blocks that do not overlap and no normalization after the addition has to be executed. We therefore have (1) Remark 1. For usual q-base we have an analogous definition. Let a, b be integers such that a < q for some ≥ 0, thus we have the identity where s q denotes the sum of digits function in q-base. For Zeckendorf base there are two major differences with respect to the usual q-base. First, we have a transversal carry propagation and this translates into the condition k 2 − K 1 ≥ 2 instead of k 2 − K 1 ≥ 1 that we would have for the usual q-base. Secondly, the identity (2) is not true in general when we replace q by F and s q by s Z . We will use Lucas numbers to replace the usual shift q .
1.3. Main results. In the following we will determine a lower bound for the maximum order complexity of S Z = (s Z (n) mod 2) n and for S Z,P = (s Z (P (n)) mod 2) n with P ∈ Z[X] a monic polynomial such that P (N 0 ) ⊂ N 0 . In what follows, we use Vinogradov's notation f g is defined as |f | ≤ c|g| for some c > 0.
Since the correlation measure is bounded below by the maximum order complexity (see [17]), Theorem 1 shows that S Z is non-random in this specific respect. We mention also the recent result of Shutov [25] that shows that the autocorrelation of order 2 with lag equal to 1 of (−1) s Z (n) is large. This serves as motivation to look at subsequences, that we address in following result.
where the implied constant only depends on P .
We will discuss the heuristics that supports the real growth of the maximum order complexity in the final part of the paper (Section 3.2). In particular, we conjecture that the lower bound is indeed the actual growth of the maximal order complexity.
The rest of the paper is structured as follows. In Section 2, we prove Theorem 1 and Theorem 2 where we first prove the linear case and the particular case P (X) = X d for d ≥ 2 before tackling the general case. We conclude the paper with some final remarks (Section 3) about possible generalizations of this result to other numerations systems and some heuristically supported conjectures.

Sum of digits function in Zeckendorf base
In order to prove a lower bound for the Nth maximum order complexity of a sequence, we use a tool from [12, Proposition 3.1].

Lemma 1 ([12]
). Let S be a sequence over F 2 of length n. Let k be the length of the longest subsequence of S that occurs at least twice with different successors. Then S has maximum order complexity k + 1.
The proofs of Theorem 1 and Theorem 2 are split into two parts. Let N be a sufficiently large integer. First we built two subsequences of the sequence S of same length L(N ), depending on N , which coincide by using non-interfering terms. Then, for these subsequences, we look for different successors, by studying precisely the involved carry propagations. Thus, by Lemma 1, we then will have M (S, N ) ≥ L(N ) + 1.
2.1. Linear case. We first study the maximum order complexity of S Z .
Proof. If n < F , the terms n and F +1 , respectively, n and F +2 are non-interfering, see (1). The second line follows from s Z (F + F +1 ) = 1 and s Z (F + F +2 ) = 2.
We are now able to prove Theorem 1.

2.2.
Monomial subsequences. We now study the sequence S Z along polynomial values. In a classical q-base, xq j is a shift of length j for the expansion of x. In Zeckendorf base, the Fibonacci numbers do not have this property since a power of a Fibonacci number is in general not a Fibonacci number (note that the only exceptions of pure powers that are Fibonacci numbers are 1, 8 and 144, see [5]). The Lucas numbers are an interesting analogue of powers of q in q-base.
We have for all j ≥ 1, the basic relation L j = F j+1 + F j−1 , which means that the expansion of Lucas numbers in Zeckendorf base is simple. Moreover we have the following formulas.

Lemma 3 ([26]
). For all k ≥ ≥ 0 and h ≥ 0, we have Furthermore, let m > 0, there are non-adjacent terms ε −(2u+1) (m), . . ., ε 2u+v (m) ∈ {0, 1}, ε −2u−1 (m) = ε 2u+v (m) = 1 for some u, v integers depending only on m such that for all k ≥ 2u + 3, The last statement of Lemma 3 has an important role for the construction of sums with non-interfering terms. Indeed, for an integer m and k large enough (of order of length of m), the expansion of mL k is the expansion of m centered around F k . Notice that this result is different from the q-base since the digits here appear on both sides of the expansion of m. We will see the impact in our main result Theorem 2 with the occurence of N 1/(2d) in the place of N 1/d that we got in the case of q-base expansion, see [21].
Let us start with the case P (X) = X d for d ≥ 2. In the following we write λ = λ mod 2 with λ ∈ {0, 1}. This case is the building brick for the general case of P (X) ∈ Z[X] with P (N 0 ) ⊂ N 0 .
To begin with, we study the expression of (n + L ) d in terms of a sum of distinct Lucas numbers.
Lemma 4. Let n ≥ 0 be an integer and ≥ 0 be an even integer. We have Proof. Let d be even. Then by Lemma 3 we have For d odd the proof runs along the same lines and we have Lemma 5. Let n ≥ d be an integer, d ≥ 3 an odd integer and 1 ≤ λ ≤ d. Then we have Proof. We distinguish the two following cases: Again we get the result for n ≥ d.
with real parameters m i , see [26]. For d ≥ 1 set Note that for k sufficiently large, the coefficients c i are independent from k.
We will need the following auxiliary result [26,Lemma 4]. This lemma will be useful to construct two elements with different sums of digits in Zeckendorf base when we take their dth powers. Indeed, only the subdominant coefficient is negative so we are able to create a block of digits 1010 · · · 10 of length k for any k large enough. Indeed, as we will state later, the transition from k to k + 1 adds exactly one block of 10. We have already used a similar method in the usual 2-base, see [21,proof of Lemma 6].
In the following, let α ≥ 1 be an integer such that and m 2 = 1 and m 0 , m 1 , m 3 integers such that Under these conditions, T d (k) and T d (k + 1) have all positive integral coefficients with the only exception of the coefficient of L 2k(3d−1) and L 2(k+1)(3d−1) respectively, see [26]. Notice that these coefficients are the same for these two polynomials for k large enough.
Lemma 7. Let d ≥ 3 be odd and k ≥ 0 be a sufficiently large integer. Let n be an integer such that n ≥ d and Then we have Proof. Let ≥ 0 be an even integer, we have already proved in Lemma 4 that for odd d we have Condition (4) and Lemma 5 imply that all coefficients in front of each L λ , for we study for the range of digits of each term in the sum with the help of Lemma 3. Hence for sufficiently large , the range of digits of  is included in the interval [λ − 3k, λ + 3k] for λ > 0 and [0, 3k − 1] for λ = 0. If we suppose that these intervals are disjoints plus one small gap, see Remark 1, we have a non-interfering sum, i.e when we suppose . . . , For this to happen, it is sufficient to suppose > 6k and we have imposed even. So we can choose = 6k + 2 in order to have a non-interfering sum. An identical proof works for = 6k + 4 and (5) is proved.
We are now able to prove Theorem 2 in the particular case P (X) = X d .
Proof of Theorem 2. We suppose the same hypotheses as in Lemma 7 and we choose k ≥ 0 such that Thus condition (4) gives n d F 3k and n F since we need t(k) d a successor of the non-interfering block. We have t(k) ∼ m 3 L 6k ∼ m 3 ϕ 6k and F for k → +∞. Therefore for sufficiently large k, (8) is satisfied. For the same reasons, we need A very similar proof of (8) gives (9) for k sufficiently large. Furthermore, (7) gives and the theorem is proved if d is odd.
For d even, we prove a similar result as Lemma 7 and a similar proof works for the same reasons (we omit the details). Thus Theorem 2 is proved in the case P (X) = X d .

Polynomial subsequences.
We consider now the general case with P (X) = α d X d + · · · + α 0 a polynomial such that P (N 0 ) ⊂ N 0 and α d = 1. Such as before, we shall determine exactly P (n + L k ) for the integers n ≥ 0 et k ≥ 0. Proof. The proof is similar to Lemma 4. Lemma 9. Let n ≥ C d and λ ≥ 1 be integers with C d an absolute constant depending only on d. Then we have β λ (n) < β 0 (n).
Proof. The proof is again similar to Lemma 5.
Let µ be an integer. We have by Lemma 8 Remark 3. We introduce µ since it is sufficient to adjust the non-interfering block to have the same result. Later, we shall take µ depending only on d.
To prove a lower bound on the Nth maximum order complexity of S Z,P , we look for an analogue of Lemma 7. The analogue of the first part of this lemma is described as follows.
Thus the lemma is proved.
In order to obtain the analogue of the second part of Lemma 7, we are now looking for an integer n of the form L λ for some λ and r > 1 such that s Z (P (L λ + L 2dµk+2 )) = s Z (P (L λ + L 2dµk+2r )). (12) According to Lemma 10, we need λ ≥ µk. Note that we want to prove that M (S Z,P , N ) N 1/(2d) in order to have the same bound as the one for the monomial case. The following result gives sufficient conditions for the size of λ and r for this bound.
Lemma 11. If λ ≤ 2dµk and r is constant, then we have M (S Z,P , N ) Proof. If we have λ such that (12) is verified, we show in the same way as before that M (S Z,P , N ) ≥ F µk , where k is chosen in a way that

This implies
If λ ≤ 2dµk and r is constant, we have N F 2d µk and M (S Z,P , N ) N 1/(2d) . Notice that µ independent from k is also required to have this result.
As we will state later, only two Lucas numbers will interfere. The following lemma describes all the possibilities for this interference.
Lemma 12. Let k, be two integers such that k ≥ ≥ 5. We have Proof. We have L k = F k+1 + F k−1 and L = F +1 + F −1 . So we shift two blocks of 101 one against the other and look for transversals in the carry propagations. Note that if k ≥ + 4, there is no carry propagation at all and s Z (L k + L ) = 4 ≡ 0 (mod 2). By symmetry, there remain only four cases to consider. We suppose ≥ 5: Proof of Theorem 2. We now investigate the interferences in For each β i (λ)L i(2dµk+2) we locate the least significant digit and the most significant digit. Then we have the following possible interferences We will now choose λ even. Thus we have for the first interference L λd + L 2dµk−(d−1)λ+2 . By Lemma 12 we have for sufficiently large k Hence it is sufficient to take µ = 2d − 1 and λ = 2dk. Furthermore, all other possible interferences are non-existing by this choice of λ and µ. We finally need to check if λ satisfies all the conditions: λ is even and (2d − 1)k ≤ λ ≤ 2d(2d − 1)k. Furthermore we can take r = 2 for example and all the appearing blocks do not interfere. Summing up, we have proved that s Z P L λ + L 2d(2d−1)k+2 = s Z P L λ + L 2d(2d−1)k+4 . Thus, we have proved the general case of Theorem 2.
Remark 4. The choice of L 2dµk+2 in the proof is motivated to have an integer solution for λ in (13). Indeed, if we had chosen L 2dµk instead, (13) would not have provided an integer for all k. and we define p −2 = 0, p −1 = 1, q −2 = 1, q −1 = 0, and p n = a n p n−1 + p n−2 , q n = a n q n−1 + q n−2 . Then we have pn qn = [a 0 , a 1 , . . . , a n ]. The sequence (q n ) n is called denominators of the convergents of the continued fraction of α.
Definition 8 (Ostrowski's α-numeration system). Let α be a non rational real number, and let (q n ) be the sequence of the denominators of the convergents of the continued fraction of α. Then every non-negative integer n can be represented uniquely in the form where the ε i are integers satisfying the following conditions: ( For the specific case α = ϕ, we have the Zeckendorf expansion since ϕ = [1, 1, 1, . . .]. Our result might be generalized to a quadratic irrational α such that the continued fraction of α is of the form α = [1, a, a, . . .]. In this particular case, we have q n+2 = 1 a q n+1 + q n . We denote by γ the zero of the polynomial x 2 − 1 a x − 1 such that its Galois conjugate γ verifies |γ| < |γ|. Thus we have q n = 1 √ a −2 +4 (γ n − γ n ), an analogous formula that for Fibonacci numbers. We define an analogue of Lucas numbers by L n = γ n + γ n for all n ≥ 0. Then, in this particular case, our new notion of "Lucas numbers" verifies L n = q n+1 + q n−1 and an analogous formula of Lemma 3 holds true. So it might be possible to generalize our result in this case since no more input in the proof is needed.

3.2.
Conjectures. We can compute the maximum order complexity thanks to Blumer's DAWG (Direct Acyclic Weighted Graph) algorithm (see [3] and [12]). The C++ program that computes the maximum order complexity of a sequence is available on the web page of the second author. 1 By using this program, we are able to formulate some heuristically supported conjectures. Conjecture 1. We conjecture that M (S Z , N ) ∼ 1 1+ϕ 2 N . Figure 1 indicates that the maximum order complexity for S Z is linear with coefficient 1 1+ϕ 2 = 0.27639 . . . Let us compare the maximum order complexity along polynomial subsequences of the Thue-Morse sequence to the Zeckendorf expansion sequence.
The plots for squares and cubes (and the large values of R 2 ), see Figure 2 and Figure 3, indicate that the growth is close to x 1/2 and x 1/3 , respectively. We therefore formulate the following conjecture :    The maximum order complexity of S ϕ is algorithmically more difficult to handle. Motivated by the results on Thue-Morse we conjecture the following: This is, to some extent, supported by the plot for squares, see Figure 4. Again, a proof of this conjecture would imply that the lower bound in Theorem 2 is sharp. Notice that there is a a larger gap for the maximum order complexity between the linear case and the quadratic case for S Z compared to the classical Thue-Morse sequence.
We conclude the discussion by a surprising phenomenon on steps. Since the maximum order complexity is integer-valued and an increasing function, it is a step function. Each time M (S, N ) has a different value from M (S, N − 1), we say that N is a step. The ratio of successive steps is the ratio N 1 /N 2 for two steps N 1 , N 2 such that there is no N ≥ 1 with M (S, N 1 ) < M (S, N ) < M (S, N 2 ).
We observed that the ratio of successive steps seems to converge.
Conjecture 4. The ratio of successive steps for the maximum order complexity of a sequence related to the Thue-Morse sequence, respectively, the sequence related to the Zeckendorf sum of digits, tends to 2, respectively, the golden ration ϕ.
This phenomenon seems to be related to numeration systems, and not directly to the fact that a sequence is automatic or morphic.