{'fraction_non_alphanumeric': 0.05370015671251959, 'fraction_numerical': 0.021521852690231585, 'mean_word_length': 3.978502080443828, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 16, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 12, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
On the Entropy and Letter Frequencies of Ternary Square-Free Words

We enumerate all ternary length-l square-free words, which are words avoiding squares of words up to length l, for l<=24. We analyse the singular behaviour of the corresponding generating functions. This leads to new upper entropy bounds for ternary square-free words. We then consider ternary square-free words with fixed letter densities, thereby proving exponential growth for certain ensembles with various letter densities. We derive consequences for the free energy and entropy of ternary square-free words.


Introduction
The interest in the combinatorics of pattern-avoiding [3,2,8], in particular of power-free words, goes back to work of Axel Thue in the early 20th century [35,36]. The celebrated Prouhet-Thue-Morse sequence, defined by a substitution rule a → ab and b → ba on a two-letter alphabet {a, b}, proves the existence of infinite cube-free words in two letters a and b.
Here, a word of length n is a string of n letters from a certain alphabet Σ, an element of the language L(n) = Σ n of n-letter words in Σ. The union is the language of all words in the alphabet Σ. It is a monoid, with concatenation of words as operation, and with the empty word λ of zero length as neutral element [22].
A word w is called square-free if w = xyyz, with words x, y and z, implies that y = λ is the empty word, and cube-free words are defined analogously. So square-free words are characterised by the property that they do not contain an adjacent repetition of any subword.
It is easy to see that there are only a few square-free words in two letters, these are the empty word λ, the two letters a and b, the two-letter words ab and ba, and, finally, the three-letter words aba and bab. Appending any letter to those two words inevitably results in a square, either of a single letter, or of one of the square-free two-letter words.
However, there do exist infinite ternary square-free words, i.e., square-free words on a three-letter alphabet. In fact, the number s n of ternary square-free words of length n grows exponentially with n. Denoting set sets of ternary square-free words of length n by A n , we have and so on. So s 0 = 1, s 1 = 3, s 2 = 6, s 3 = 12, and so on, see [1] and [12] where the values of s n for n ≤ 90 and 91 ≤ n ≤ 110 are tabulated, respectively. In [29], the sequence s n is listed as A006156 (formerly M2550).
In this article, we consider ternary square-free words [35,36,38,25,3,4,5,11,22,28,21,27,18,1,10,24,12,9,32]. We are interested in the asymptotic growth of the sequence s n . We use a series of generating functions for a truncated square-freeness condition and conjecture the presence of a natural boundary at the radius of convergence. We also consider the frequencies of letters in ternary square-free words and derive upper and lower bounds. We prove exponential growth for certain ensembles of ternary squarefree words with fixed letter frequencies. We use methods of statistical mechanics [17] to prove that, subject to a plausible regularity assumption on the free energy of ternary square-free words, the maximal exponential growth occurs for words with equal mean letter frequencies, where we average over all square-free words. Some of our results are based on extensive exact enumerations of square-free ternary words of length n ≤ 110 [12] and on constructions of generalised Brinkhuis triples [11,12].

Ternary square-free words
Denote the number of ternary square-free words by s n and the corresponding generating function by S(x), Since the language of ternary square-free words is subword-closed, we conclude that the sequence s n is submultiplicative, A standard argument, compare [1, Lemma 1] and [17,Lemma A.1], shows that this guarantees that the limit S := lim n→∞ 1 n log s n , also called the entropy, exists. Bounds for the limit have been obtained in a number of investigations [5,4,11,10,24,12,32], which give 1.1184 ≈ 110 1/42 ≤ exp(S) < 1.30201064 , but the exact value is unknown. The lower bound implies an exponential growth of s n with n. The behaviour of the subleading corrections to the exponential growth is not understood.
One of the authors computed the numbers s n for n ≤ 110 [12]. Assuming an asymptotic growth of the numbers s n of the form we used differential approximants [15] of first order to get estimates of the critical point x c = exp(−S), the critical exponent γ and the critical amplitude A. We obtain where the number in the bracket denotes the (estimated) uncertainty in the last digit. The value of γ, also found in [24], suggests a simple pole as dominant singularity of the generating function at x = x c . Numerical analysis indicates the presence of a natural boundary, a topic which we considered further by computing approximating generating functions S (ℓ) (x), which count the number of words which contain no squares of words of length ≤ ℓ.

Generating functions
We call a word w ∈ L length-ℓ square-free if w = xyyz, with x, z ∈ L and y ∈ ℓ n=0 L(n), implies that y is the empty word λ. In other words, w does not contain the square of a word of length ≤ ℓ.
Denote the number of ternary length-ℓ square-free words of length n by s n , because at least the same number of words are excluded. On the other hand, we have s (ℓ ′ ) n = s (ℓ) n = s n for n < 2ℓ. Thus, by considering larger and larger squares ℓ, we approach the case of square-free words.
We define corresponding generating functions for the number of ternary length-ℓ square-free words. These generating functions are rational functions of the variable x which can be calculated explicitly, at least for small values of ℓ, see [24] where the computation is explained in detail. The first few generating functions are We computed the generating functions S (ℓ) (x) explicitly for ℓ ≤ 24. The functions are available as Mathematica code [37] at [14]. Note that some generating functions agree; for instance, S (4) (x) = S (5) (x). The reason is that, going from ℓ = 4 to ℓ = 5, no "new" squares arise; in other words, all squares of square-free words of length 5 already contain a square of a word of smaller length. The radius of convergence x (ℓ) c ≤ x c of the series defining the generating function S (ℓ) (x) is determined by a pole in the complex plane located closest to the origin, thus by a zero of the denominator polynomial of smallest modulus. Due to Pringsheim's theorem [30,Sec. 7.21], a real and positive such zero exists. Note that the zeros of the numerator and denominator are mutually exclusive, because the do not contain common polynomial factors.
The values x (ℓ) c are given in Table 1, together with the degrees d num and d den of the polynomials in the numerator and in the denominator which both grow with ℓ. Thus, with growing length ℓ, the generating functions S (ℓ) (x) have an increasing number of zeros and poles. The patterns of zeros and poles appear to accumulate in the complex plane close to the unit circle around the origin; and comparing the patterns for increasing ℓ one might be tempted to the plausible conjecture that the poles approach the unit circle in the limit as ℓ → ∞. However, there appear to be some oscillations in the patterns close to the real line, and at present we dot not have any argument why the poles should accumulate on the unit circle.
The values x (ℓ) c in Table 1 approach x c from below, so they yield upper bounds on the exponential growth constant S = − log(x c ). The upper bound quoted in equation (5) above was given in [24] on the basis of an estimate for x (23) c obtained via the series expansion of S (23) (x). Our value for x (23) c , based on the complete evaluation of the generating function S (23) (x), is contained in Table 1; it confirms the bound of Noonan and Zeilberger [24]. The value for ℓ = 24 slightly improves the upper bound.
Theorem 1. The entropy S of ternary square-free words is bounded as S ≤ − log(x (24) c ), which gives exp(S) < 1.30193812 < 1/x (24) c . The complete set of poles of the generating function S (24) (x) is shown in Fig. 1. The pattern looks very similar for other values of ℓ. This suggests that, in the limit as ℓ becomes infinite, which corresponds to the generating function S(x) of ternary squarefree words, the poles accumulate close to the unit circle. This corroborates the conjecture that S(x) has a natural boundary.

Square-free words with fixed letter frequencies
We now consider the letter statistics of ternary square-free words. Denote the number of occurrences of the letter a in a ternary square-free word w n of finite length n by a(w n ). Clearly, the frequency of the letter a in w n is 0 ≤ a(w n )/n ≤ 1. For an infinite ternary square-free word w, letter frequencies do not generally exist. Consider sequences {w n } of n-letter subwords containing arbitrarily long words. We define upper and lower frequencies f + a ≥ f − a by f + a := sup {wn} lim sup n→∞ a(w n )/n and f − a := inf {wn} lim inf n→∞ a(w n )/n, where we take the supremum and infimum over all sequences {w n }. We can also compute these from a + n = max wn⊂w a(w n ) and a − n = min wn⊂w a(w n ) by f ± a = lim n→∞ a ± n /n, as these limits exist. This follows, for instance, from the subadditivity of the sequences {a + n } and {1 − a − n }. If the infinite word w is such that f + a = f − a =: f a , we call f a the frequency of the letter a in w. In general, f + a > f − a , and letter frequencies do not exist, see also the discussion below.
However, we can derive bounds on the upper and lower letter frequencies f + a and f − a . Denote the number of ternary square-free words of length n which contain the letter a exactly k times by s n,k . Since there are no square-free words of length greater than three in two letters, a ternary square-free word contains no gaps between letters a of length greater than three. This implies s n,k = 0 for k < n/4 or k > n/2, since the minimal number of letters b and c is, by the same argument, equal to k = n/2. By counting the number s n,k of ternary square-free words with a given number k of letters a, we can sharpen these bounds. Clearly, for fixed k, there are numbers n min (k) and n max (k) such that s n,k = 0 for n < n min (k) and n > n max (k). This means that any ternary square-free word of length (m + 1)n max (k) ≥ n > mn max (k), for any integer m, contains at least mk + 1 letters a, so the frequency of the letter a is bounded from below by (mk + 1)/(mn max (k) + 1), which becomes k/n max (k) as m tends to infinity. Similarly, any word of length mn min (k) > n ≥ (m−1)n min (k) contains at most mk −1 letters a. Thus we obtain an upper limit of (mk − 1)/(mn min (k) − 1), which becomes k/n min (k) as m tends to infinity. We computed n max (k) for k ≤ 31 and n min (k) for k ≤ 40; the strongest bounds are derived from n max (31) = 117 and n min (39) = 97, which yield lower and upper bounds 31/117 ≈ 0.265 and 39/97 ≈ 0.402, respectively, for the frequency of a single letter in an infinite ternary square-free word. This gives Theorem 2. The upper and lower frequencies f ± of a given letter in an infinite ternary square-free word are bounded by 0.265 Remark. In fact, there is a recent, stronger result for the lower frequency [33]. The minimum frequency f − min is bounded from below and above by [33] compare also similar treatments for binary power-free words [19,20]. The upper bound can be sharpened to f + ≤ 469/1201 ≈ 0.390508 [34].
It is easy to see that the mean letter frequency of any given letter in the set of ternary square-free words is 1/3. This is a consequence of symmetry under permutation of letters. Indeed, the symmetric group S 3 acts on any square-free word w by permutation of the three letters, and the set of square-free words of a given length is a disjoint union of orbits under this action. Each orbit consists of a square-free word and its images under permutation of letters, and each letter has the same mean frequency on this orbit. So, for each orbit, the mean frequency of any given letter is 1/3, thus also for the set of all ternary square free words of any given length, or indeed for the set of all ternary square free words.
We now want to show that there exist ternary square-free words of infinite length with well-defined letter frequencies for the case f a = f b = f c = 1/3 and for some cases where not all letter are equally frequent. In fact, we are going to prove not just that, but that there are exponentially many such words, so the growth rate for words of fixed frequencies, at least for the cases considered below, is positive. This can be done in a similar fashion as the proofs that the number of ternary square-free words grow exponentially [5,4,11,10,24,12,32]. These proofs are based on Brinkhuis triple pairs [5,4,11,10,24] and their generalisations [11,12,32]. We briefly sketch the argument here, see [5,4,11,10,24,12,32] for details.
The argument is based on square-free morphisms [6,7]. Here, we immediately consider the generalised version of [11,12]. Assume that we have a set of substitution rules c , 1 ≤ j ≤ k, are ternary square-free words of equal length m. Starting from any ternary square-free word w of length n, consider the set of all words of length mn obtained by substituting each letter, choosing independently one of the k words from the lists above. A generalised Brinkhuis triple is defined as a set of substitution rules (9) such that all these words of length mn are square-free, for any choice of w. This immediately implies that the number of square-free words grows at least as k 1/(m−1) , see [12,Lemma 2]. In the case k = 1, this reduces to a usual substitution rule without any freedom; in this case, it only proves existence of infinite words, not exponential growth of the number of words with length.
In [12], a special class of generalised Brinkhuis triples was considered, and triples up to length m = 41 with k = 65 were obtained. This was recently improved to m = 43 and k = 110 in [32], yielding the lower bound of (5).
What about the letter frequencies? In general, the words w (j) a that replace a will have different letter frequencies, and in this case it is easy to see that not all the infinite words obtained by repeated substitution will have well-defined letter frequencies. However, we can say something about letter frequencies if we consider generalised Brinkhuis triples where all words w (j) a , 1 ≤ j ≤ k, have the same letter frequencies, and analogously for the words w In general, all entries of this matrix are positive integers, because there are no square-free words of length m > 3 with only two letters. The (right) Perron-Frobenius eigenvector is thus positive, and its components encode the letter frequencies of the infinite words obtained by repeated application of the substitution rules. The Perron-Frobenius eigenvalue is m, because (1, 1, 1) is a left eigenvector with eigenvalue m. As mentioned previously, the generalised Brinkhuis triples considered in [12] do not have the property that the letter frequencies of the substitution words coincide. However, if we have a generalised Brinkhuis triple, any subset of substitutions also forms a triple, because all we do is restricting to a subset of words which still are square-free. So by looking at the triples of [12] and selecting suitable subsets of substitutions, we can use the same arguments to prove exponential growth of words with fixed letter frequencies.

Equal letter frequencies
Let us first consider the case of equal frequencies f a = f b = f c = 1/3. We note that the special Brinkhuis triples of [12] had the additional property that w If we select a subset of the words replacing a such that they have the same numbers of letters n a a , n b a and n c a , the substitution matrix for the corresponding triple consisting of those words and their images under σ is M =   n a a n c a n b a n b a n a a n c a n c a n b a n a a   (11) which is symmetric. Hence the right Perron-Frobenius eigenvector is (1, 1, 1) t , and the letter frequencies are given by f a = f b = f c = 1/3. The simplest example is a Brinkhuis triple with m = 18 [12] (see also [24]) which explicitly given by where w (1) a denotes w a read back-to-front, which thus has the same letter numbers n a a = 7, n b a = 5 and n c a = 6. So the number of ternary square-free words with letter frequencies f a = f b = f c = 1/3 grows at least as 2 1/17 . By looking for the largest subsets of words with equal letter frequencies in the special Brinkhuis triples of [12], we can improve this bound. For m = 41, we find 30 words w Remark. This bound can without doubt be improved, because the triples of [12] and [32] where not optimised to contain the largest number of words of equal frequency.

Unequal letter frequencies
What about words with non-equal letter frequencies? The following square-free substitution rule [38] a → cacbcabacbab b → cabacbcacbab c → cbacbcabcbab (13) already shows that infinite words with unequal letter frequencies exist. In this case, the substitution matrix is and the right Perron-Frobenius eigenvector with eigenvalues 12 is (11, 13, 12) t . Thus this substitution leads to a ternary square-free word with letter frequencies f a = 11/36, f b = 13/36 and f c = 1/3. Can we show that, for some frequencies, there are exponentially many words? Indeed, for some examples we can find generalised Brinkhuis triples by choosing subsets of those given in [12]. Here, we restrict ourselves to a few examples.
Lemma 2. The entropy of ternary square-free words with fixed letter frequency f a is strictly positive for f a ∈ { 16 51 , 9 28 11 32 , 10 29 , 6 17 }. One should expect that the entropy is strictly positive for all letter frequencies f a in an interval. However, it is not straightforward to show that by using substitutions of Brinkhuis triples with different letter frequencies. The reason is that, in general, the infinite words obtained by such substitutions do not have well-defined letter frequencies.
In the following sections, we are going to use methods from the theory of generating functions and convex analysis [31] which are often applied in the context of statistical mechanics [17]. The free energy of square-free words, which we will define below, is related to the entropy function of square-free words with fixed letter density, as follows from Proposition 2. An immediate consequence of the concavity of the entropy function is that the entropy is strictly positive for all frequencies f a ∈ (16/51, 6/17) ≈ (0.3137, 0.3529), see below.

Free energy
Since the language of square-free words is subword closed, the numbers s n,k satisfy the submultiplicative inequality Consider the functions s n (q) defined by s n (q) = n k=0 s n,k q k . These are polynomials in q of degree not larger than n. The submultiplicative inequality (23) implies for the functions s n (q) that s n+m (q) ≤ s n (q) s m (q) for 0 < q < ∞. We are interested in the exponential growth rate of s n (q). To this end, define F n (q) := 1 n log s n (q). The submultiplicative inequality yields [17, Lemma A.1] that the limit F (q) := lim n→∞ F n (q) exists, and that F (q) < ∞ for 0 < q < ∞. The function F (q) is called the free energy of the model. More can be said about the properties of the free energy by using convexity arguments. These are largely independent of the underlying combinatorial model and are discussed in detail in [17, Sec. 2.1, App. B]. We obtain Proposition 1. The functions F n (q) = 1 n log s n (q) of ternary square-free words are continuous, analytic and convex in log q in (0, ∞). The free energy F (q) of ternary squarefree words F (q) = lim n→∞ F n (q) (24) exists and satisfies F (q) < ∞ for q ∈ (0, ∞). Moreover, it is a convex function of log q for q ∈ (0, ∞). If F (q) is finite, its right-and left-derivatives exist everywhere in (0, ∞), and they are non-decreasing functions of q. The function F (q) is differentiable almost everywhere, and wherever the derivative dF (q)/dq exists, it is given by lim n→∞ dF n (q)/dq.
In the following, we will apply the results of the preceding section in order to derive bounds on the free energy. This will show that the free energy F (q) is finite for 0 < q < ∞. Using the above substitution rule (13) and the substitution rule given in [33], we first derive a lower bound on the free energy.
Proof. Consider ternary square-free words w n of length n = 12k, where k ∈ N, generated by the substitution rule (13), with w 1 = c. Define k + (n) = 13n/36 + δ + (n), which denotes the number of letters of type a in w n . Note that δ + (n) = o(n). We have s n (q) ≥ s n,k + (n) q k + (n) . Taking the logarithm, dividing by n and performing the limit leads to F (q) ≥ 13 36 log q. The second part of the statement follows by the same argument with the substitution rule given in [33].

Remark.
A weaker bound with 64/233 replaced by 11/36 > 64/233 may be derived using the substitution (13), where the role of a and b are interchanged.
We now turn to the question of an upper bound, which can be analysed using the bounds for letter frequencies obtained in [33,34] or in Theorem 2. Proof. Assume that q = 1. (The case q = 1 has been discussed in Section 2, where F (1) = − log x c was proven.) Assume that B n and A n are numbers such that s n,k = 0 for k > B n or k < A n , s n,Bn > 0, and s n,An > 0. For 1 = q ∈ (0, ∞) we have the estimate Assume that q > 1. Taking the logarithm, dividing by n and performing the limit n → ∞, this implies F (q) ≤ log x c + ǫ + log q, where ǫ + = lim sup n→∞ B n /n. Note that ǫ + ≤ 469/1201, as follows from the bound given in [34]. A similar argument holds for q < 1, involving the lower bound A n . From [33], we get the bound 1780/6481. Combining the two results, we get the inequality (26). Define the two-variable generating function S(x, q) Denote the radius of convergence of S(x, q) by x c (q). The curve x c (q) is called critical curve, and the plot of x c (q) in the xq-plane is called the phase diagram of the model. The free energy is related to the critical curve by We set x c = x c (1) for the critical point of ternary square-free words. Bounds on the curve x c (q) can be derived from bounds on the free energy F (q) as given above. This yields The phase diagram is shown in Fig. 2. Using the series data from exact enumeration for length n ≤ 100, we extrapolated the values of x c (q) for different values of q, using first order differential approximants [15]. The critical curve x c (q) is, within the analysed range of q, very close to the curve x c q −1/3 , reflecting the fact that the values k = k(n) where s n,k = 0 are sharply concentrated around k = ⌊n/3⌋. For large values of q, such a form is, however, not compatible with the derived bounds on x c (q). Numerical analysis suggests that the leading divergence of S(x, q) is a simple pole, which is approached uniformly in x and q. Thus, there is no indication that the nature of the singularity changes, in contrast to other examples from statistical mechanics, where such a change indicates a phase transition [17].

Entropy and symmetry
We now address the question of the number of ternary square-free words, where we fix the frequency of letters of type a. We consider the number of square-free words s n,⌊ǫn⌋ in n letters with ⌊ǫn⌋ occurrences of the letter a. The number ǫ may thus be regarded as the frequency of the letter a. We are interested in the exponential growth rate of s n,⌊ǫn⌋ . This leads to the question whether sequences of the form 1 n log s n,⌊ǫn⌋ have a limit as n → ∞, which we then call entropy function P (ǫ). It is related to the free energy F (q) by a Legendre-Fenchel transform, as we will now show.
Note that there is a constant K > 0 such that 0 ≤ s n,k ≤ K n for each value of n and k. This follows from the existence of the entropy s of ternary square-free words. Note also that there exists a finite constant C > 0, and numbers A n and B n such that s n,An > 0 and s n,Bn > 0, and s n,k ≥ 0, when 0 ≤ A n < k < B n ≤ Cn. This follows from the substitution rule (13). Take A n and B n such that s n,k = 0 if k < A n or k > B n . Define the numbers From [33,34] Moreover, there is a sequence of integers {σ n } ∞ n=0 such that σ n = o(n) and the limit P (ǫ) = lim n→∞ 1 n log s n,⌊ǫn⌋+σn (33) exists and is finite and concave in (ǫ − , ǫ + ). Lastly, note also that δ n = ⌊ǫn⌋ + σ n is the least value of k that maximises s n,kq k , whereq is that value of q where the infimum is taken in (32).
We consider now the question where the entropy function takes its maximum. To this end, we assume a special regularity condition on the free energy, whose validity is supported by the numerical analysis of the preceding section, see also the discussion in the conclusion.
We note that at q = 1, the letter density ǫ = F ′ (1) is the mean letter density, which was determined above to be ǫ = 1/3 by a symmetry argument. Thus, under the above regularity assumption, maximum entropy occurs at equal (mean) letter density ǫ a = ǫ b = ǫ c = 1/3. This is an example of the more general result that maximum entropy in occurs at points of maximum symmetry, see [26] for the concept of symmetry and its implications for the free energy and entropy of the combinatorial problem of random tilings, which is applicable in this case.

Conclusions
In this article, we considered the growth rate, or the entropy, of the set of ternary squarefree words. By computing generating functions S (ℓ) (x) for length-ℓ square-free words, where the condition of square-freeness is truncated at length ℓ, we verified an upper bound proposed in [24] and slightly improved it. The pattern of poles of these generating functions, and their behaviour as ℓ increases, points towards a natural boundary for the generating function S(x).
The presence of a natural boundary in a model indicates that it cannot be solved exactly in terms of standard functions of mathematical physics, which obey linear differential equations with polynomial coefficients [16]. This would exclude, for ternary square-free words, an exact value for the entropy and the functional form of the free energy. It may even be difficult to prove the existence of a critical exponent, compare the related self-avoiding walk problem [17].
In the ternary alphabet, no letter is preferred by the condition of square-freeness. Thus, averaging over the entire sets of ternary square-free words, all letters appear equally often. However, in a single infinite word this need not be the case, indeed, the letter frequency may not be well-defined. However, one can derive limits on the minimum or maximum frequency of a given letter in an infinite ternary square-free words, and by explicitly constructing infinite words with given well-defined frequencies by means of substitution rules the minimum and maximum frequency can be bounded from above and below. We obtained limits from counting square-free words up to a certain length, sharper limits were given recently in [33,34]. The bounds for the maximum frequency can certainly be further improved employing the approach of [19,20,33].
Lower bounds on the entropy are based on Brinkhuis triples and their generalisations. We used these to prove that, for a list of rational values, the entropy of the set of squarefree words with a fixed letter frequency is strictly positive. Together with the concavity of the entropy function, obtained by methods of convex analysis and statistical mechanics, this led to the result that the entropy is strictly positive on an entire interval.
Concerning the entropy function, it would be interesting to extend the interval of strict positivity by providing sharper bounds from suitable substitution rules. This might be achievable by following and suitably modifying the approach taken in [19,20,33]. It is conceivable, albeit not necessary, that there exists a region of frequencies for which infinite square-free words exist, but the entropy vanishes, because the number of squarefree words with that given letter frequency grows sub-exponentially. Such behaviour has been reported for kth-power-free binary square-free words with rational powers in the range 2 < k ≤7/3 [13].
Further, it is necessary to prove the validity of the regularity assumption on the free energy in Theorem 5. In contrast to other problems in statistical mechanics [17], there is no indication of a phase transition in the model of ternary square-free words, wherefore an analytic free energy is expected.
It would also be interesting to analyse the letter distribution using probabilistic methods. Similar examples lead, in an appropriate scaling limit, to Gaussian distribution functions [23].