Pseudoperiodic Words and a Question of Shevelev

We generalize the familiar notion of periodicity in sequences to a new kind of pseudoperiodicity, and we prove some basic results about it. We revisit the results of a 2012 paper of Shevelev and reprove his results in a simpler and more unified manner, and provide a complete answer to one of his previously unresolved questions. We consider finding words with specific pseudoperiod and having the smallest possible critical exponent. Finally, we consider the problem of determining whether a finite word is pseudoperiodic of a given size, and show that it is NP-complete.


Introduction
Periodicity is one of the simplest and most studied aspects of words (sequences).Let w = a 0 a 1 a 2 • • • a t−1 be a finite word.We say that w is (purely) periodic with period p (1 ≤ p ≤ t) if a i = a i+p for 0 ≤ i < t − p.For example, the French word entente is periodic with periods 3, 6, and 7.The definition is extended to infinite words as follows: w = a 0 a 1 • • • is periodic with period p if a i = a i+p for all i ≥ 0. Unless otherwise stated, all words in this paper are indexed starting with index 0.All infinite words are defined over a finite alphabet.
In this paper we begin the study of a simple and obvious-yet apparently little-studied-generalization of periodicity, which we call k-pseudoperiodicity.
Definition 1.We say that a finite word w = a 0 a 1 • • • a t−1 is k-pseudoperiodic if there exist k ≥ 1 integers 0 < p 1 < p 2 < • • • < p k such that a i ∈ {a i+p1 , a i+p2 , . . ., a i+p k } for all i with 0 ≤ i < t − p k .For infinite words the membership must hold for all i.If this is the case, we call (p 1 , p 2 , . . ., p k ) a pseudoperiod for w.
In this paper, when we write a pseudoperiod (p 1 , p 2 , . . ., p k ) we always assume 0 < p 1 < • • • < p k .Note that 1-pseudoperiodicity is the ordinary notion of (pure) periodicity.If an infinite word w is kpseudoperiodic for some k < ∞, we call it pseudoperiodic.
We note that our definition of pseudoperiodicity is not the same as that studied by Blondin Massé et al. (2012).Nor is it the same as the notion of quasiperiodicity, as introduced by Marcus (2004), and now widely studied in many papers.Nor is it the same as "almost periodicity", which is more commonly called uniform recurrence (i.e., every block that occurs, occurs with bounded gaps between successive occurrences).

Notation
We use the familiar regular expression notation for regular languages.For infinite words, we let x ω for a nonempty finite word x denote the infinite word xxx • • • .
The exponent of a finite word x, denoted exp(x) is |x|/p, where p is the smallest period of x.For example, if x = entente, then exp(x) = 7/3.If q divides |x|, then by x p/q we mean the word of length p|x|/q that is a prefix of x ω .For example, (alf) 7/3 = alfalfa.
If all the nonempty factors f of a (finite or infinite) word x satisfy exp(f ) < e, we say that x is e-free.If they satisfy exp(f ) ≤ e, we say that x is e + -free.
The critical exponent of an infinite word w is the supremum of exp(x) over all finite nonempty factors x of w.Here the supremum is taken over the extended real numbers, where for each real number α there is a corresponding number α + satisfying α < α + < β for all β > α.Thus if x is a real number, the inequality x ≥ α + has the same meaning as x > α.
If S is a set of (finite or infinite) words, then its repetition threshold is the infimum of the critical exponents of all its words.
A run in a word is a maximum block of consecutive identical letters.The first run is called the initial run.
An occurrence of a finite nonempty word x in another word w (finite or infinite) is an index i such that w[i + j] = x[j] for 0 ≤ j < |x|.The distance between two occurrences i and i ′ is their difference |i ′ − i|.

Goals of this paper
There are five basic questions that interest us in this paper.
1. Given an infinite sequence s, is it pseudoperiodic?2. If s is k-pseudoperiodic for some k, what is the smallest such k? 3.If s is k-pseudoperiodic, what are all the possible pseudoperiods of size k? 4. What is the smallest possible critical exponent of an infinite pseudoperiodic word with specified pseudoperiod?
5. How quickly can we tell if a given finite sequence has a pseudoperiod of bounded size?
In particular, we are interested in answering these questions for the class of sequences called automatic.A novel feature of our work is that much of it is done using a theorem-prover for automatic sequences, called Walnut, originally developed by Hamoon Mousavi.For more information about Walnut, see Mousavi (2016); Shallit (2022).
Here is a brief summary of what we do in our paper.In Section 2 we prove basic results about pseudoperiodicity, and show that questions 1, 2, and 3 above are decidable for the class of automatic sequences.In Section 3, we recall Shevelev's problems about pseudoperiods of the Thue-Morse word, solve them using our method, and also solve his open question from 2012.In Section 4, we obtain analogous pseudoperiodicity results for some other famous sequences.In Section 5 we turn to question 4, obtaining the best possible critical exponent for binary words having certain pseudoperiods.In Section 6 we treat the case of larger alphabets and obtain some results.In Section 7 we prove that checking the existence of a pseudoperiod of size k is, in general, a difficult computational problem, thus answering question 5. Along the way, we state two conjectures (Conjectures 34 and 39) and one open problem (Open Problem 30).Finally, in Section 8, we make some brief biographical remarks about Vladmir Shevelev.

Basic results
Proposition 2. An infinite word s is pseudoperiodic if and only if there exists a bound B < ∞ such that two consecutive occurrences of the same letter in s are always separated by distance at most B.
On the other hand, if two consecutive occurrence of every letter are always separated by distance ≤ B, then we may take (1, 2, . . ., B) as a pseudoperiod for s.
For binary words we can say this in another way.Proposition 3. Let x be an infinite binary word.
(a) If M is the maximum element of a pseudoperiod, then the longest non-initial run in x is of length ≤ M − 1; (b) if the longest non-initial run length in x is B, then (1, 2, 3, . . ., B + 1) is a pseudoperiod.
In particular, an infinite binary word is pseudoperiodic if and only if it consists of a single letter repeated, or its sequence of run lengths is bounded.
Proof: Suppose x is pseudoperiodic with pseudoperiod (p 1 , p 2 , . . ., p k ) and let M = max 1≤i≤k p i .Let a ∈ {0, 1} and let x[p..q] be a run of a's and x[q + 1..r] be the following run (of a's).Then x[r + 1] = a.Now consider x[q] = a.Since x is pseudoperiodic, we know that (r + 1) − q ≤ M .Hence all non-initial runs are of length at most M − 1.
On the other hand, if index p does not correspond to the last letter of a run, then If it does so correspond, since the word is binary and all non-initial run lengths are bounded, say by B, we know that x[p Proof: Follows immediately from Proposition 3.
Theorem 5.If an infinite word has pseudoperiod S then it has ≤ max S distinct letters.If it has exactly max S distinct letters, then it must have a suffix of the form x ω , where x is a word of length max S containing each letter exactly once.
Proof: Suppose w has pseudoperiod S, with k = max S. Since each occurrence of a letter is followed by another occurrence of the same letter at distance ≤ k, it follows that each letter of w must occur with frequency ≥ 1/k in w.But the total of all frequencies must sum to 1, so there cannot be more than k distinct letters.
Now suppose w has exactly k distinct letters, say 0, 1, . . ., k − 1.Without loss of generality, assume that the last letter to occur for the first time is k − 1 and p k−1 is this first occurrence.Furthermore, let p 0 , . . ., p k−2 be the positions of the last occurrence of the letters 0, 1, . . ., k − 2 that precede p k−1 , and again, without loss of generality assume for some words w 1 , w 2 , . . ., w k−1 , where w i contains no occurrences of letters < i.However, if any of these w i were nonempty then w could not be pseudoperiodic (because the 0 at position p 0 would not be followed by another 0 at distance ≤ k).So all the w i are empty.Furthermore, pseudoperiodicity also shows that w[p k−1 + 1] = 0, and inductively, that w[p k−1 + i] = (i − 1) mod k for all i ≥ 0.
We now turn to results about automatic sequences.This is a large and interesting class of sequences where the nth term is computed by a finite automaton taking as input the representation of n in some base (or generalizations, such as Fibonacci base).For more information about automatic sequences, see Allouche and Shallit (2003).
Corollary 6. Problems 1, 2, and 3 above are decidable, if s is an automatic sequence.
Proof: By the results of Bruyère et al. (1994), it suffices to create first-order logical formulas asserting each property.The domain of the variables in all logical statements is assumed to be N = {0, 1, 2, . ..}, the natural numbers.
By Proposition 2, we know that s is pseudoperiodic if there is a bound on the separation of two consecutive occurrences of the same letter.We can assert this as follows.First, define a formula that asserts that i < j are two consecutive occurrences of the same letter: asserts the claim that two consecutive occurrences of the same letter are separated by at most B. Finally, the formula ∃B sep(B) evaluates to TRUE if and only s is pseudoperiodic.This solves the first problem.
Once we know that s is pseudoperiodic, we can find the smallest B such that sep(B) holds.To do so, form the automaton for sep(B) ∧ ¬ sep(B − 1); it will accept exactly one value of B, which is the desired minimum.This tells us that s has pseudoperiod (1, 2, . . ., B), so certainly it is B-pseudoperiodic.
We can now write the assertion that s has a pseudoperiod of size p, as follows: By testing this for p = 1, . . ., B, we can find the smallest p for which this holds.This solves problem 2. Finally, we can determine all possible pseudoperiods of size p with the formula The corresponding finite automaton accepts all the possible pseudoperiods (a 1 , . . ., a p ) of size p.
From these ideas we can prove an interesting corollary.
Corollary 7. Suppose the automatic sequence s is not k-pseudoperiodic.Then there exists a constant C (depending only on s) such that for all k-tuples 0 Proof: A trivial variation on the previous arguments shows that if s is automatic, then there is an automaton accepting, in parallel, n, p 1 , p 2 , . . ., p k such that n is the smallest natural number satisfying Thus, in the terminology of Shallit (2021), this n can be considered a "synchronized function" of (p 1 , . . ., p k ).We can then apply the known linear bound on synchronized functions (Shallit, 2021, Thm. 8) to deduce the existence of C such that n ≤ Cp k .
Although, as we have just seen, these problems are all decidable for automatic sequences in theory, in practice, the automata that result can be extremely large and require a lot of computation to find.We can use Walnut, a theorem-prover originally designed by Mousavi (2016) to translate logical formulas to automata.
Example 8. Let us consider an example, the Fibonacci word f = 01001010 • • • , the fixed point of the morphism 0 → 01, 1 → 0. The following Walnut code demonstrates that it is 2-pseudoperiodic.(In fact, this follows from the much more general Proposition 9 below.) We can determine all possible pseudoperiods of size 2 using Walnut, as follows: )": The resulting automaton accepts all pairs (a, b) that are pseudoperiods of f , in Fibonacci representation.It has 28 states and is displayed in Figure 1.
It is easy to see from the definition of s α,β that s α,0 is a suffix of an infinite concatenation of blocks of the form 0 c1−1 1 and 0 c1 1.It follows that (c 1 , c 1 + 1) is a pseudoperiod.
Remark 11.Trivial observation: to determine whether a given fixed tuple (p 1 , p 2 , . . ., p k ) is a pseudoperiod of an infinite sequence s, it suffices to examine all of the factors of length p k + 1 of s.

Shevelev's problems
In this section, we consider some results of Vladimir Shevelev (2012).We reprove some of his results in a much simpler manner, obtain new results, and completely solve one of his open questions.
Recall from Section 1.1 that the Thue-Morse sequence t = 01101001 • • • is the infinite fixed point, starting with 0, of the map sending 0 → 01 and 1 → 10.Shevelev was interested in the pseudoperiodicity of t, and gave a number of theorems and open questions involving this sequence.We are able to prove all of the theorems and conjectures in Shevelev (2012) using our method, with the exception of his Conjecture 1. Luckily, this conjecture was already proved by Allouche (Allouche, 2015, Thm. 3.1).
For the second statement, we use Walnut again.To prove the second half of the theorem, we assert 2-pseudoperiodicity as follows and show that it is false: Translating the assertion into Walnut, we have: This returns FALSE, which proves that the Thue-Morse sequence is not 2-pseudoperiodic.
Since t is not 2-pseudoperiodic, we know from Corollary 7 that there exists a constant C such that for For the Thue-Morse word, we can prove the following bound: The previous result is optimal, in the sense that if the bound 5 3 b is reduced, then there are infinitely many counterexamples.
Shevelev's proof of this was rather long and involved.We can prove it almost instantly with Walnut, as follows: Proof: We express the conditions placed on the triples as follows.
We write the proposition as: Translating the above into Walnut commands, we have: )": # returns TRUE # 6 ms The assertion returns TRUE, which proves that the Thue-Morse sequence is 3-pseudoperiodic.
Shevelev observed that Theorem 14 did not characterize all such triples.In his Proposition 2, he showed (1, 8, 9) is a pseudoperiod.We can do this with Walnut as follows: These two results caused Shevelev to pose his "Open Question 1", which in our terminology is the following: Open Problem 15.Characterize all triples (a, b, c) with 1 ≤ a < b < c that are pseudoperiods for the Thue-Morse sequence.
Shevelev was unable to solve this, but using our methods, we can easily solve it.
Theorem 16.There is a DFA of 53 states that accepts exactly the triples (a, b, c) such that 1 ≤ a < b < c is a pseudoperiod of t.
Proof: We want to characterize the triples (a, b, c) such that We construct the following DFA triple in Walnut to answer the question.
)": # returns a DFA with 53 states # 4356513 ms This gives us an automaton of 53 states, which is presented in the Appendix.Determining it was a major calculation in Walnut, requiring 4356 seconds of CPU time and 18 GB of storage.The complete answer to Shevelev's question is then the set of triples accepted by our DFA triple.
Because the answer is so complicated, it is not that surprising that Shevelev did not find a simple answer to his question.Now that we have the automaton triple, we can easily check any triple (a, b, c) to see if it is a pseudoperiod of t in O(log abc) time, merely by feeding the automaton with the base-2 representations of the triple (a, b, c).
Furthermore, our automaton can be used to easily prove other aspects of the pseudoperiods of the Thue-Morse sequence.We now look at the possible distances between pseudoperiods of t.
Proof: We use the following Walnut code.Proof: To assert the claim in first-order logic, we first construct a formula to show that at least one of the values in S is not equal to the other two; this implies that S contains both t[i] and t[i]: Our theorem can then be expressed as follows.We now turn to Shevelev's Propositions 3 and 4 in Shevelev (2012).In our terminology, these are as follows: Proposition 20.For all k ≥ 1, the Thue-Morse sequence has pseudoperiod (a, b, c) if and only if it has pseudoperiod (2 k a, 2 k b, 2 k c).
Proof: We prove the following equivalent statement which implies the proposition by induction on k: Translating this into Walnut, we have the following.

Other sequences
After having obtained pseudoperiodicity results for the Thue-Morse sequence t, it is logical to try to obtain similar results for other famous sequences.
In this section we examine sequences such as the Rudin-Shapiro sequence rs, the variant Thue-Morse sequence vtm, the Tribonacci sequence tr, and so forth.
For each sequence s in this section, we assert 2-pseudoperiodicity as follows and use Walnut to determine whether it holds: And we assert 3-pseudoperiodicity as follows and use Walnut to determine whether it holds:

The Mephisto Waltz sequence
The Mephisto Waltz sequence mw = 001001110 • • • is defined by the infinite fixed point of the morphism 0 → 001, 1 → 110 starting with 0. It is sequence A064990 in the OEIS.
Proof: We translate the assertions of 2-pseudoperiodicity into Walnut as follows and show that it is false.
)": # 496 ms # return FALSE We translate the assertions of 3-pseudoperiodicity into Walnut as follows and show that it is true.
Knowing that the Mephisto Waltz sequence is 3-pseudoperiodic naturally leads to the following problem.
Problem 22. Characterize all triples (a, b, c) with 1 ≤ a < b < c that are pseudoperiods for the Mephisto Waltz sequence.
We want to characterize the triples (a, b, c) such that We construct the following DFA triplemw in Walnut to solve the problem.
)": # returns a DFA with 13 states # 2331762 ms The complete answer to this problem is the set of triples accepted by our DFA triplemw.

The ternary Thue-Morse sequence
The ternary Thue-Morse sequence vtm = 210201 • • • is defined by the infinite fixed point of the morphism 2 → 210, 1 → 20, and 0 → 1 starting with 2. It is sequence A036577 in the OEIS.
Proof: We translate the assertions of 2-pseudoperiodicity into Walnut as follows and show that it is false.
)": # 235 ms # return FALSE We translate the assertions of 3-pseudoperiodicity into Walnut as follows and show that it is true.
Knowing that the ternary Thue-Morse sequence is 3-pseudoperiodic naturally leads to the following problem.
Problem 24.Characterize all triples (a, b, c) with 1 ≤ a < b < c that are pseudoperiods for the ternary Thue-Morse sequence.
We want to characterize the triples (a, b, c) such that We construct the following DFA triplevtm in Walnut to solve the problem.
)": # returns a DFA with 12 states # 815830898 ms The complete answer to this problem is the set of triples accepted by our DFA triplevtm.It is depicted in Figure 2. Again, this was a very large computation with Walnut.
Fig. 2: Automaton recognizing all pseudoperiods of size 3 for the vtm sequence.
Pseudoperiodic Words and a Question of Shevelev

13
By looking at the acceptance paths of Figure 2, we can deduce the following result.
Theorem 25.The only 3-pseudoperiods for the vtm sequence are Proof: There are only essentially three possible paths to the accepting state labeled 8 in Figure 2.They are labeled By considering the base-2 numbers specified by each coordinate, we obtain the theorem.

The period-doubling sequence
The period-doubling sequence pd = 1011101011 • • • is defined by the infinite fixed point of the morphism 1 → 10, 0 → 11 starting with 1.It is sequence A035263 in the OEIS.
Proof: We translate the assertions of 2-pseudoperiodicity into Walnut as follows and show that it is false.
)": # 424 ms # return FALSE We translate the assertions of 3-pseudoperiodicity into Walnut as follows and show that it is true.
Knowing that the period-doubling sequence is 3-pseudoperiodic naturally leads to the following problem.
Problem 27.Characterize all triples (a, b, c) with 1 ≤ a < b < c that are pseudoperiods for the perioddoubling sequence.
We want to characterize the triples (a, b, c) such that We construct the following DFA triplepd in Walnut to solve the problem.
)": # returns a DFA with 28 states # 30 ms The complete answer to this problem is the set of triples accepted by our DFA triplepd.

The Rudin-Shapiro sequence
The Rudin-Shapiro sequence r = 00010010 is, the number of occurrences of 11, computed modulo 2, in the base-2 representation of n.It is sequence A020987 in the OEIS.
Proof: To check 3-pseudoperiodicity, we used the Walnut command which returned the result FALSE.This was a big computation, requiring 20003988ms and more than 200 GB of memory on a 64-bit machine.

The Tribonacci sequence
The Tribonacci sequence is a generalization of the Fibonacci sequence.It is defined by the infinite fixed point of the morphism 0 → 01, 1 → 02, and 2 → 0 and is sequence A080843 in the OEIS.
Proof: It has pseudoperiod (4, 6, 7), as can be easily verified by checking all factors of length 8 (or with Walnut).
Open Problem 30.Characterize all the 3-pseudoperiods of the Tribonacci sequence.
Although this is in principle doable with Walnut, so far, this seems to be beyond our computational abilities, requiring the determinization of a large nondeterministic automaton.

The paperfolding sequences
The paperfolding sequences are an uncountable family of sequences originally introduced by Davis and Knuth (1970) and later studied by Dekking et al. (1982).The first-order theory of the paperfolding sequences was proved decidable in Goč et al. (2015).Every infinite paperfolding sequence is specified by an infinite sequence f of unfolding instructions.Since Walnut's automata work on finite strings-they are not Büchi automata-we have to approximate an infinite f by considering its finite prefixes f .A fuller discussion of exactly how to do this can be found in (Shallit, 2022, Chap.12); we just sketch the ideas here.
We can use Walnut to determine the pseudoperiods of any specific paperfolding sequence, or the pseudoperiod common to all paperfolding sequences.
Walnut can prove that no paperfolding sequence is 2-pseudoperiodic, as follows: Here pffactoreq asserts that the two length-n factors of the paperfolding sequence specified by a finite code f , one beginning at position i and one at position j are the same.And linkf asserts that x = 2 |f | .The assertion paper pseudo2 is that there exists some paperfolding sequence and numbers a, b such that every position i has a symbol equal to either the symbol at position i + a or i + b.
However, not all pseudoperiods work for all paperfolding sequences.For example, we can use Walnut to show that (1, 2, 16) is a pseudoperiod for the paperfolding sequence specified by the unfolding instructions 1 1 1 • • • , but not a pseudoperiod for the regular paperfolding sequence (specified by We can compute the pseudoperiods that work for all paperfolding sequences simultaneously, using the following Walnut code: The automaton in Figure 3 accepts the base-2 representation (here, least significant digit first) of those triples (a, b, c) with 1 ≤ a < b < c as a pseudoperiod for all paperfolding sequences.The general strategy we employ is the following.We use a heuristic search procedure to try to guess a morphism h a,b such that either h a,b (t) or h a,b (vtm) has pseudoperiod (a, b) and avoids e + powers for some suitable exponent e.Once such an h a,b is found, we can verify its correctness using Walnut.Simultaneously we can do a breadth-first search over the tree of all binary words having pseudoperiod (a, b) and avoiding e-powers.If this tree turns out to be finite, we have proved the optimality of this e.
Our first result shows that this critical exponent can never be ≤ 7/3.
Theorem 31.If x is an infinite binary word that is 2-pseudoperiodic, then x contains a (7/3)-power.
Proof: Suppose x has pseudoperiod 1 ≤ a < b, but is (7/3)-power-free.Theorem 6 of Karhumäki and Shallit (2004) says that every infinite (7/3)-power-free binary word contains factors of the form µ i (0) for all i ≥ 0. These factors are all prefixes of t.
However, as we have seen in Theorem 13, the prefix of length 5 3 b + 1 of t cannot have pseudoperiod a, b, as the relation t 3 b.Thus it suffices to choose i large enough such that 2 i ≥ 5 3 b + 1.This contradiction proves the result.Next we consider the case b = 2a.
Proposition 32.Let a ≥ 1 be an integer.If an infinite word has pseudoperiod (a, 2a), then it has critical exponent ∞.
Proof: Suppose that x has pseudoperiod (a, 2a).From x extract the subsequences x a,i = (x[an + i]) n≥0 corresponding to indices that are congruent to i (mod a), for 0 ≤ i < a. Clearly each such subsequence has pseudoperiod (1, 2).By Proposition 4, each subsequence x a,i must be of the form c ω or c * (cd) ω for c, d distinct letters.It now follows that x is eventually periodic with period 2a, and hence has infinite critical exponent.
Proof: The claim about the pseudoperiods is clear.The result about power-freeness can be found in, e.g., (Karhumäki and Shallit, 2004, Theorem 5).
We now summarize our results on critical exponents in the following table.Each entry corresponding to a pseudoperiod (a, b) with b ̸ = 2a has three entries:  Tab.1: Optimal critical exponents for binary words with certain specified pseudoperiod.
From examination of Table 1, we see that all the critical exponents are at most 3 + .This leads to the following conjecture.
Conjecture 34.For all pairs (a, b) with 1 ≤ a < b and b ̸ = 2a, there exists an infinite binary word with pseudoperiod (a, b) and avoiding 3 + -powers.
We verified this conjecture for 1 ≤ a < b ≤ 54.For each pair of a and b, we first try each previously saved morphism h on the Thue-Morse sequence t to see if h(t) has pseudoperiod {a, b} and avoids 3 +powers.If that fails, we use backtracking to search for a new morphism that meets the criteria.Once we find such an morphism, we verify the pseudoperiodicity and the powerfreeness with Walnut and save the morphism for future use.
The following morphism is an example.It is initially generated for a = 1 and b = 5 but it also works for 122 other pairs of a and b we tested.
Suppose that h 1,6 (vtm) contains a factor w that is a (7/3) + -power.Thus |w| > 1000.Notice that the factor 0011 is a common prefix of the h 1,6 -image of all three letters.Moreover, 0011 appears in h 1,6 (vtm) only as the prefix of the h-image of a letter.
We consider the word w ′ obtained from w by erasing the smallest prefix of w such that w ′ starts with 0011.Since we erase at most |h(0)| − 1 = 15 letters, the word w ′ is a repetition of period p and exponent at least 2.2.
Finally, the results with a morphic word using µ as outer morphism are obtained via Proposition 33.
5.1 Binary words with pseudoperiods of form (1, a) Theorem 35.For least 85% of all positive integers a ≥ 3 there is an infinite binary word with pseudoperiod (1, a), and avoiding 3 + -powers.
Proof: The idea is to search for words with the given properties that have pseudoperiod (1, a) for all a in a given residue class a ≡ i (mod n).As before, our words are constructed by applying an n-uniform morphism (obtained by a heuristic search) to the Thue-Morse word t, and then correctness is verified with Walnut.
Our results are summarized in Table 2.

Larger alphabets
Up to now we have been mostly concerned with binary words.In this section we consider pseudoperiodicity in larger alphabets.

Proposition 4 .
The only infinite words with pseudoperiod (1, 2) are those of the form a ω or a * (ab) ω and b * (ba) ω for distinct letters a, b.The only finite words with pseudoperiod (1, 2) are those of the form a * (ab) * (a + ϵ) with a ̸ = b.
For each a ≥ 1 there exist arbitrarily large b, c such that (a, b, c) is a pseudoperiod of t.(b) For each b ≥ 2 there exist pairs a, c such that (a, b, c) is a pseudoperiod of t.(c) For each c ≥ 3 there exist pairs a, b such that (a, b, c) is a pseudoperiod of t.Proof: We use the following Walnut code.eval tmpa "Aa,m (a>=1) => Eb,c b>m & c>m & $triple(a,b,c)": eval tmpb "Ab (b>=2) => Ea,c $triple(a,b,c)": eval tmpc "Ac (c>=3) => Ea,b $triple(a,b,c)": and Walnut returns TRUE for all three.
(a) upper left: an exponent e, where the repetition threshold for C a,b is e + ; (b) upper right: the length of the longest finite word having pseudoperiod (a, b) and avoiding e-powers; (c) lower line: the morphic word with pseudoperiod (a, b) and avoiding e + powers.