{'fraction_non_alphanumeric': 0.0720095844630809, 'fraction_numerical': 0.02244782142631944, 'mean_word_length': 3.416457811194653, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 29, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Generalized Farey trees, transfer Operators and phase transitions

We consider a family of Markov maps on the unit interval, interpolating between the tent map and the Farey map. The latter map is not uniformly expanding. Each map being composed of two fractional linear transformations, the family generalizes many particular properties which for the case of the Farey map have been successfully exploited in number theory. We analyze the dynamics through the spectral analysis of generalized transfer operators. Application of the thermodynamic formalism to the family reveals first and second order phase transitions and unusual properties like positivity of the interaction function.


Introduction
The piecewise real-analytic map is known as the Farey map.
From the ergodic point of view it is of interest, since it is expanding everywhere but at the fixed point x = 0 where it has slope one. This makes this map a simple model of the physical phenomenon of intermittency [PM]. From the point of view of number theory, F 1 encodes the continued fraction algorithm as well as the Riemann zeta function. In particular it has an induced version given by the celebrated Gauss map [Ma]. In addition, several models of statistical mechanics have been considered in recent years in connection to Farey fractions and continued fractions [Kn2,Kn1,KO,FKO,LR]. Altogether this motivates a precise analysis of the dynamics induced by F 1 . An effective tool in this analysis is provided by the transfer operator associated to the map (see [Ba] for an overview). For the map F 1 the spectrum of the transfer operator when acting on a suitable space of analytic functions has been studied in [Is] and [Pr] and turns out to have a continuous component, in particular no spectral gap. As a consequence, the Farey map is ergodic w.r.t. the a.c. infinite measure dx x . Another interesting ergodic invariant measure for F 1 is the Minkowski probability measure d? (for the question mark function) which is singular w.r.t. Lebesgue measure and turns out to be the measure of maximal entropy for F 1 . On the other hand, the Minkowski question mark function conjugates F 1 with the much simpler tent map which is ergodic w.r.t. Lebesgue measure and is -from the point of view of number theory -connected with the base 2 expansion.
In [GI] it was first noticed that F 0 and F 1 can be viewed as instances of a one-parameter family of interval expanding maps F r which are continuous, real-analytic and accessible, being composed of two Möbius transformations. The present article now follows this line of research and connects it with aspects coming from thermodynamic formalism. In particular, one aim is to extend the theory developed in [Kn2] and [Kn1] to a more general class of trees encoding the dynamics of the maps F r . It turns out that all these models share several interesting algebraic relations (see below). Besides that, the value of this approach consists in the fact that some delicate properties of the arithmetic case r = 1 can be approached by first studying the corresponding properties for r < 1 by means of spectral techniques, taking advantage of the existence of a spectral gap for the transfer operator, and then taking the limit r → 1. The paper is organized as follows. In Section 2 we introduce the one-parameter family of interval maps F r and recall some of its basic properties obtained in [GI]. We then describe some relevant features of the Ruelle transfer operators associated to this family including its action on a suitable invariant Hilbert space of analytic functions. In Section 3 we describe how using the maps F r we can construct a one-parameter family of binary trees T (r) interpolating between the dyadic tree and the Farey tree. As the parameter r ranges in the unit interval, the natural coding associated to real numbers in [0, 1] by each tree induces a Hölder continuous conjugation between the maps F r and F 0 , thus generalizing the Minkowski question mark function (Lemma 3.1). Moreover we show (Proposition 3.6) that T (r) can be also constructed by a local generating rule which generalizes the mediant operation used to generate Farey fractions. A closed expressions for the trace of the iterates of the transfer operator in terms of weighted sums over the leaves of the tree is obtained in Theorem 3.9, along with some consequences both on dynamical zeta functions and Fredholm determinants for the family F r . The trees T (r) turn out to be fundamental objects in establishing a direct connection between the transfer operators mentioned above and the partition functions of class of spin chains introduced in Section 4. Using a polymer expansion technique we prove in Theorem 4.5 that when the parameter r is positive the interaction associated to the corresponding spin chain model is of ferromagnetic type. In the last section we establish explicit formulas for the iterates of the transfer operators (Propositions 5.1, 5.9 and 5.11) which are used to evaluate the canonical (and grand canonical) partition functions as well as some twisted sum with possible number theoretic significance. From this analysis it turns out that in the canonical setting our models undergo a phase transition whose features are described in Theorem 5.5.

A one-parameter family of 1D maps
For r ∈ (−∞, 2), let F r denote the piecewise real-analytic map F r of the interval [0, 1] defined as Although some of the result obtained below hold true for a wider range of r values, in this paper we shall mainly restrict to r ∈ [0, 1] where this is a Markov family interpolating between the Farey map (r = 1) and the linear expanding tent map (r = 0), see

Previous results
We now recall the main properties of this family, referring to [GI] for details. For This means that for 0 ≤ r < 1 the map F r is uniformly expanding, i.e. |F ′ r | ≥ ρ > 1, thus providing an example of analytic Markov map [Ma]. On the contrary, for r = 1 one has |F ′ (x)| > 1 for x > 0 but F ′ (0) = 1. For r > 1 the origin becomes attractive and there is new repelling fixed point x * with F ′ r (x * ) = (2 − r) −1 . The left and right inverse branches of F r are given by This yields ( [GI], Lemma 2.1): (2.6) The Perron-Frobenius operator or transfer operator P r associated to F r is the operator acting on functions f : [0, 1] → C as For r ∈ [0, 1] the fixed function of P r corresponds to the density of an F r -invariant absolutely continuous measure ν r (dx). A direct calculation shows that with K r a suitable positive constant. For r < 1 the choice , r ∈ (0, 1) 1/2 , r = 0 We refer to [GI] for several results on the measure ν r with different normalization constants.
Besides the relation between fixed functions and invariant measures, also the rest of the spectrum sp(P r ) of the transfer operator is strongly related to the dynamical and statistical properties of F r (for a general overview see [Ba]. On Banach spaces of sufficiently smooth functions, e.g. C k ([0, 1]), P r is quasi-compact. Namely, its spectrum is made out of a finite or countable set of isolated eigenvalues with finite multiplicity (the discrete spectrum) and the essential spectrum confined in a disk around the origin. More precisely, for the family F r , the following can be proven [GI] Proposition 2.1 For all r ∈ [0, 1), k ≥ 0, the essential spectrum of P r : C k → C k is a disk of radius r ess (P r ) ≤ e −k log ρ .
Moreover, for r = 1 and for each fixed k ≥ 0 the essential spectrum coincides with the whole unit disk.

Generalized transfer operators
The structure under the "essential spectrum rug" can be revealed by looking at the action of the operator on Banach spaces of more regular functions. We shall do it for a more general family of transfer operators. Given a complex weight s ∈ C, we let P s,r denote the generalized transfer operator associated to the map F r . It acts on a function f : [0, 1] → C as It is remarkable that having fixed s ∈ C these operators leave invariant the same Hilbert space for all r ∈ [0, 1].
Definition 2.2 We denote by H s the Hilbert space of all complex-valued functions f which can be represented as a generalized Borel transform with inner product and measure m s (dt) = t 2s−1 e −t dt.
An alternative representation can be obtained by a simple change of variable when x is real and positive: Note that a function f ∈ H s is analytic in the disk To understand the action of the transfer operator on this Hilbert space, let us define for r ∈ [0, 1] the following two families of operators M s,r , N s,r : L 2 (m s ) → L 2 (m s ) as: where J p denotes the Bessel function of order p. Note that for r = 1 M s,r reduces to a multiplication operator.

Proposition 2.3
The space H s , s ∈ C is invariant for P s,r and we have Moreover, for all r ∈ [0, 1) the transfer operator P s,r when acting upon H s is of the trace-class, with Proof. The representation of P s,r on the space H s can be readily obtained by generalizing the calculations done in [GI], Thm 4.3, to prove the statement for s = 1, by using the Tricomi identity [GR] with the choice p = 2s − 1. The formula for the trace will be reobtained and generalized to all iterates of P s,r with the additional tools developed later on (see Theorem 3.9). Now it can be derived from the following result for the spectrum of the two operators M s,r and N s,r which is a simple generalization of that given for s = 1 in [GI], Propositions 4.5 and 4.6.

Proposition 2.4
• For all r ∈ [0, 1) and s ∈ C the operator M s,r : L 2 (m s ) → L 2 (m s ) is of the trace class and its spectrum is given by • For all r ∈ [0, 1] and s ∈ C the operator M s,r : L 2 (m s ) → L 2 (m s ) is of the trace class and its spectrum is given by Remark 2.5 For r = 1 the spectrum of operator M s,1 is given by the closure of the range of the multiplying function e −t that is [0, 1]. Therefore, since P s,1 acts as a selfadjoint compact perturbation of a selfadjoint multiplication operator, sp(P s,1 ) ⊇ [0, 1] (see [Is], [Pr]).
We end this section with some remarks on the general structure of the eigenfunctions of the operator P s,r . The matrix S r := r−1 2−r r 1−r = 1−ρ ρ 2−ρ ρ−1 ∈ P SL(2, R) (2.14) with S 2 r = Id and det S r = −1 acts on C as the Möbius transformation Therefore the eigenvalue equation is equivalent to the generalized three-term functional equation which for r = 1 reduces to the Lewis-Zagier functional equation arising in the theory of modular forms [LZ].
3 Dynamical binary trees and coding

A generalization of the Farey Tree
For each r ∈ (−∞, 2) we construct a 'dynamical' binary tree T (r) from the sequences The ordered elements of T n can be written as ratios of irreducible polynomials over Z, with positive coefficients when written as functions of the variable ρ = 2 − r. For example, , 1 + 2ρ 2 + 3ρ , 1 + ρ + ρ 2 2 + ρ + ρ 2 and so on. The rooted tree T is now constructed as follows: • for n ≥ 1 the n-th row has 2 n−1 vertices, ordered in [0, 1], and coincides with T n \ T n−1 . The vertex 1/2 ∈ T 1 is considered as the root, • edges connect each element in T n \ T n−1 to a pair of elements in T n+1 \ T n in such a way that no edges overlap. The edge pointing to the left is labelled by 0, the other edge by 1.
We say that an element p q ∈ T has rank n, written rank( p q ) = n, if it belongs to T n \ T n−1 . We say moreover that two elements p q , p ′ q ′ in T n are neighbours whenever they are neighbours when T n is considered as an ordered subset of [0, 1]. It is an easy task to realize that for each pair of neighbours p q , p ′ q ′ in T n one of them has rank n and the other has rank n − k for some 1 ≤ k < n. Since F r is expansive for all r ∈ [0, 1] the vertex set of T (r) is dense in [0, 1]. In particular (see Fig.3.2), • T (1) is the Farey tree whose vertex-set is Q ∩ (0, 1). • T (0) is the dyadic tree whose vertex-set is the set of all dyadic rationals of the form k/2 m .
• For r > 1 the vertex set of T (r) is not dense anymore and for r ր 2 accumulates to the single point 1/2.
In Fig. 3.3 we plot the n-th row of T (r) for n = 10 and different values of r ∈ [0, 2). The following result is a straightforward consequence of the construction given above and developed in what follows (see Lemma 3.5).
Lemma 3.1 For all r ∈ [0, 1] we have that • to every x ∈ [0, 1] there corresponds a unique sequence φ r (x) ∈ {0, 1} N which represents the sequence of edges of an infinite path {x k } k≥1 on T (r) with x 1 = 1/2 and x k → x (if x is a vertex of T (r) we extend the sequence leading to that vertex either with 01 ∞ or 10 ∞ );  Remark 3.2 dh r (x) is the measure of maximal entropy for F r , and for r = 0 is plainly singular w.r.t. Lebesgue (cfr. (2.8)).
• Instead, for r = 1, if in continued fraction notation x = [a 1 , a 2 , a 3 , . . . ] then φ 1 (x) = 0 a 1 1 a 2 0 a 3 · · · . In this case the conjugating function h 1 (x) = φ −1 0 • φ 1 (x) is but the Minkowski question mark function [Mi], defined as For k ∈ N 0 the point 1/2 has exactly 2 k preimages w.r.t. the iterated map F k r . We enumerate them using the group G k := (Z/2Z) k , the group elements σ = (σ 1 , . . . , σ k ) ∈ G k being ordered lexicographically. Considered as a function of r the preimage indexed by σ is a quotient p k (σ) q k (σ) of polynomials. These are inductively defined by setting p 0 := 1, q 0 := 2, Here we use the shortcut σ for the group element (1 − σ 1 , . . . , 1 − σ k ). The identities follow immediately from (3.2) and (3.3). Note that in terms of the left and right inverse branches of F r (cfr (2.3) and (2.4)) we can write The induction step for the following arithmetic characterization for r = 0 and r = 1 is provided by (3.5).
Lemma 3.4 Let σ ∈ G k be of the form with u = 0 for n odd and u = 1 otherwise, and some positive integers a i , 1 ≤ i ≤ n, such that a n > 1 and a 1 = k + 1 for n = 1 and n i=1 a i = k + 2 for n > 1.
The connection between this coding of the leaves and the one naturally induced by the dynamics can be understood as follows: let the group isomorphisms Ψ k : G k → G k be given by Proof. The relation is obviously true for k = 1 and Ψ 1 = Id G 1 . Assume now that (3.6) holds for a given k ∈ N, then from the relations: Let now consider again the sequence T n defined in (3.1). The following result generalizes for T (r) the mediant operation which generates the Farey tree T (1) [GKP].
Proposition 3.6 Let r ∈ (−∞, 2). For each pair of neighbours p q < p ′ q ′ in T n , with rank( p q ) = n − k and rank( p ′ q ′ ) = n, its child p ′′ q ′′ given by Proof. Let us assume that p q < p ′ q ′ with rank( p q ) = n − k and rank( p ′ q ′ ) = n. The opposite case is similar. We have Moreover, since p q and p ′ q ′ are neighbours we have σ ′ = σ σ * where σ * ∈ G k is given by σ * = (1, 0 . . . , 0). Now, the element having rank n + 1 which appears in T n+1 between p q and p ′ q ′ has the form pn(σ ′′ ) qn(σ ′′ ) where σ ′′ ∈ G n is given by σ ′′ = σ σ * 0. Therefore, using Lemma 3.5 we have the expressions Therefore, to complete the proof it suffices to verify that the three ratios if and only if, for any choice of (t 1 , . . . , t l ) ∈ G l , the ratios On the other hand, this property can be easily verified by induction using the expressions The first statement now follows by taking l = n − k − 1 and (t 1 , . . . , t l ) = Ψ −1 n−k−1 (σ). The second follows in a similar way. Now, for r ∈ [0, 2) the matrices are in GL(n, R). As such R they act on C as Möbius transformations, and the action of two operators forming the transfer operator P s,r = P Using the involution S = S r introduced in (2.14) we shall see that the elements of T (r) can be represented by means of a subgroup of GL(2, R) with generators For example we have More generally, we have the following characterization of the leaves of T (r) as matrix products which generalize what is known for the arithmetic case r = 1 [Kn3].

Traces and dynamical partition functions
Let us now define two maps T j : T (r) → R, j = 0, 1, as where p q =X(1) is the presentation from Prop. 3.7. For r = 1 the numbers T 0 p q and T 1 p q are given by p ′ + q ′′ and p ′′ + q ′ , respectively, with p q = p ′ +p ′′ q ′ +q ′′ . Also note that if p q occurs in T (r) at level n, namely p q ∈ T n \ T n−1 , then det(X) = −det(XS) = ρ n . (3.13) Proof. T 0 p q + T 1 p q = tr(X(1l + S)) = tr We already know that the operator P s,r = P s,r + P s,r when acting on the Hilbert space H s is of the trace class for all r ∈ [0, 1) and s ∈ C. The above construction provides a closed expression for the trace of P n s,r : H s → H s , n ≥ 1.
Theorem 3.9 For all r ∈ [0, 1), s ∈ C and n ≥ 1 we have trace (P n s,r ) = p q ∈Tn\T n−1 j=0,1 ρ ns Proof. We have 2 n terms trace (P n s,r ) = σ∈Gn trace (P (σ) s,r ) with P (σ 1 ,...,σn) s,r := P (σ 1 ) s,r · · · P (σn) s,r , and to each of them we can associate the matrix product I σ 1 · · · I σn according to (3.8) and (3.9). On the other hand, the commutation rules (3.11) yield Using this fact it is not difficult to realize that each term where I 1 appears an even number of times can be expressed in the form X = L i M i and, moreover, to each such term there corresponds exactly another term where the number of occurrences of I 1 is odd and which can be written as XS.
Finally, for all r ∈ [0, 1) and s ∈ C the generic term P is holomorphic and strictly contractive in a disk containing the unit interval, with a unique fixed pointx ∈ [0, 1]. Standard arguments then yield for its trace the expression |ψ ′ (x)| s /(1 − ψ ′ (x)) (see, e.g., [Ma], Sect. 7.2.2). The thesis now follows by direct computation putting together the above along with (3.12) and (3.13).
We now define the signed operatorP s,r : H s → H s as P s,r = P (0) s,r − P (1) s,r . (3.14) An immediate consequence of the proof of Theorem 3.9 is the following Corollary 3.10 For all r ∈ [0, 1), s ∈ C and n ≥ 1 we have trace (P n s,r ) = p q ∈Tn\T n−1 j=0,1 Furthermore, let us define a dynamical partition function Ξ n (s) as Another simple consequence of the above is the following Corollary 3.11 Ξ n (s) = trace (P n s,r ) − trace (P n s+1,r ) = p q ∈Tn\T n−1 j=0,1 The first identity now follows from the equality and the second by direct calculation.
Therefore, as r ր 1 we have T 0 → 2 and T 1 → n 2 + 4. In particular T 2 0 − 4ρ n = ρ n − 1 → 0 and the corresponding term in the trace of P n s,r diverges (see Remark 2.5). On the other hand, one easily sees that for each n ≥ 1 this is the only term which diverges as r ր 1. Unlike traces, the function Ξ n (s) is well defined for r = 1.
One can store the numbers trace (P n s,r ) and Ξ n (s) to form the Fredholm determinant respectively. Another consequence of the above is the following Corollary 3.13 For r ∈ [0, 1) and s ∈ C Moreover the above determinants are entire functions of both s and z and therefore, for all s ∈ C, ζ r (z, s) is meromorphic in the whole complex z-plane and analytic in {z ∈ C : z −1 / ∈ sp(P s,r )}.

Polymer model analysis of the Markov family
The Fourier transform of a function f : We now calculate the polynomialsp k (t),q k (t) for t ∈ G k , using the language of polymer models. As in [GuK] we call the group elements t ∈ G k a polymer if t = (t 1 , . . . , t k ) contains exactly one or two ones. So the set of polymers in G k is P k := P e k ∪ P o k with even resp. odd polymers P e k := {p ℓ,r := δ ℓ + δ r ∈ G k : 1 ≤ ℓ < r ≤ k}, P o k := {p ℓ := δ ℓ ∈ G k : 1 ≤ ℓ ≤ k}. Two polymers are called incompatible if their supports have nontrivial intersection. Thus we can uniquely decompose every group element t ∈ G k as a sum t = γ 1 + . . . + γ n of mutually incompatible polymers γ i ∈ P k . The activities of the polymers are defined as the rational functions .
This formula for the Fourier coefficients implies a symmetry of the denominator function q k which, unlike (3.4) is not immediate from its definition.
Proof. This statement is equivalent to the onê for the Fourier coefficients. Since anyhowq k (t) = 0 for odd |t|, in formula (4.4) forq k only activities z(p l,r ) of even polymers p l,r appear. Unlike the odd polymers, they have the symmetry z(p k−r+1,k−l+1 ) = z(p l,r ), which leads to the above statement.

A 1D spin chain model
In the same spirit as [Kn2] and [Kn1] we now interpret the sequences σ ∈ G k as different configurations of a chain of k classical binary spins with energy function Q k := log q k : G k → R. (4.5) The corresponding (canonical) partition function will be Plots of the function Q k for different values of r are reported in Fig.4.5. The canonical partition function can be expressed in a more standard way using the following Example 4.4 p c 2 (0, 1) = 1, p c 2 (1, 1) = 1 + ρ, q c 2 (0, 1) = q c 2 (1, 1) = 2 + ρ.

Positivity of the interaction and exponential sums
The negative Fourier coefficients −Q k (t) can then be interpreted as interaction coefficients in the sense of statistical mechanics.
In an abstract setting one starts with a finite set P of polymers. Two given polymers γ 1 , γ 2 ∈ P may or may not be incompatible. Incompatibility is assumed to be a reflexive and symmetric relation on P . Thus one may associate to a n-polymer X := (γ 1 , . . . , γ n ) ∈ P n an undirected graph G(X) = (V (X), E(X)) without loops with vertex set V (X) := {1, . . . , n}, vertices i = j being connected by the edge {γ i , γ j } ∈ E(X) if γ i and γ j are incompatible. Accordingly the n-polymer X is called connected if G(X) is path-connected and disconnected if it has no edges (E(X) = ∅).
The corresponding subsets of P n are called C n resp. D n , with D 0 := P 0 := {∅} consisting of a single element. Moreover P ∞ := ∞ n=0 P n with the subsets D ∞ := ∞ n=0 D n and C ∞ := ∞ n=1 C n . We write |X| := n if X ∈ P n . Statistical weights or activities z : P → C of the polymers are multiplied to give the activities z X := |X| i=1 z(γ i ) of multi-polymers. A system of statistical mechanics is called polymer model if its partition function Z has the form Then the free energy is given by (4.10) with n(X) := n + (X) − n − (X), n ± (X) being the number of subgraphs of G(X) connecting the vertices of G(X) with an even resp. odd number of edges.
In the present context we index by the number k of spins and use the polymer set P k from (4.1). Then the map is a set-theoretic isomorphism between the disconnected multi-polymers in {1, . . . , k} and the abelian group G k . Similarly (using a superscript e for objects derived from the subset P e k ⊂ P k of even polymers) the image of is the subgroup of G k whose elements have an even number of ones In terms of this notation and with (4.4) with the redefined single-polymer activities (4.11) By (4.10) and (4.11) we get (4.12) using the identity σ∈G k (−1) σ·s = 2 k δ s,0 . As shown in [GuK] as a consequence of Thm. 4, for the graph G = (V, E) sign(n(G)) = 0 , G not connected −(−1) |V | , Gconnected .
So, noticing the negative signs of the activities in (4.2), all terms on the r.h.s. of (4.12) are nonpositive, proving the ferromagnetic property.
Proof. Our starting point is formula (4.4): with the activities z(γ i ) defined in (4.2).
• Returning to the assumption that |t| is even, we note that supp(γ i ).
Proof. We change from additive to multiplicative notation of the group elements, that is, from t i ∈ {0, 1} to (−1) t i ∈ {1, −1}. Then the exponent in (4.13) can be written as linear combinations of the terms (−1) t i +t k , (−1) t i and t-independent constants.
In terms of s := ψ k (t) we get, using Remark 4.8 In this senseq k (t) equals, up to a sign, the Boltzmann factor of a 1D anti-ferromagnetic Ising system, whose two-body interaction is of nearest neighbor form and translation invariant.
In the sense discussed in [GuK], the functionq k equals the correlation function of the spin system at inverse temperature −1, up to a normalisation factor. So the antiferromagnetic character (the negative sign ofc 2 ) of the interaction is due to negativity of the inverse temperature.
Several mathematicians, beginning with Kac (see his Comments in Pólya [Po], pp. 424-426), Newman [Ne] and Ruelle [Ru2], conjectured the existence of a Ising spin system related to the Riemann zeta function.
One motivation for that conjecture is the Lee-Yang circle theorem of statistical mechanics. It states that all zeroes of the partition function of a ferromagnetic (a xy = a yx ∈ [−1, 1]) Ising model occur at imaginary values of the external magnetic field h (see [Ru2] for a proof).
The significance -if any -of the above corollary, remains to be clarified.

Partition function and transfer operator
We now establish a direct correspondence between the partition function Z C n of the spin chain (along with some generalizations of it) and the transfer operator of the map F r . To this end we first extend the tree T (r) by considering the treeT (r) having 1 1 as root node and T (r) as its left sub-tree starting at the second row. Each row is then completed by reflecting the corresponding row of T (r) w.r.t the middle column and acting on each leaf with the transformationŜ r defined in (2.15). Using the above terminology, the n-th row R n ofT (r) is given for n > 1 by R n := T n (r) \ T n−1 (r) ∪Ŝ r T n (r) \ T n−1 (r) (5.1) Note thatT (1) coincides with the classical Stern-Brocot tree (see Fig.5.6). Proposition 5.1 For all r ∈ [0, 2), x ∈ R + , s ∈ C and n ≥ 1 we have Proof. For n = 1 we have (P s,r 1)(x) = 2ρ s (rx + ρ) 2s .
and r p ′ + ρ q ′ = r p + ρ q Therefore r p ′ + ρ q ′ is the denominator of both descendants of p q in T (r).

Phase transitions
If we define a 'grand-canonical' ensemble as in [Kn1] where the partition function is given for k ∈ N 0 by Due to Corollary 5.2, the existence of a spectral gap for all r ∈ [0, 1) and standard arguments of thermodynamic formalism [Rue] all 'grand canonical' thermodynamic functions are analytic for all s ∈ C and there is no phase transition. On the other hand, in the canonical setting, using (5.4) and observing that the denominators q k (σ) are monotonically decreasing functions of r the limit lim n→∞ Z C n (s) exists and is finite for Re s large enough. This suggests that in this framework there is indeed a phase transition. More specifically, let (5.8) Remark 5.4 We remind the reader of the notions of order of a phase transition: for a free energy density F : R → R, s ∈ R is called a phase transition of order n ∈ N if F is n − 1 times, but not n times continuously differentiable at s.
3. For r ∈ [0, 1] there is a phase transition at s = s cr (r). More precisely, for each r ∈ [0, 1], s → F (s, r) is real analytic on R \ {s cr (r)} and F (s, r) > 0 for s < s cr (r) whereas F (s, r) = 0 for s ≥ s cr (r). If 0 ≤ r < 1, the phase transition is of first order, whereas if r = 1, it is of order two.
4. The limit (5.8) exists for all s ∈ R, r ∈ [0, 2) and M (s, r) = 0, s < s cr (r), 1, s > s cr (r). (5.11) Proof: 1. To prove the first assertion, note that since s is real, eq. (5.4) yields exp (F n (s, r)) = 1 + n−1 k=0 ρ −ks (P k s,r 1)(1) 1/n . The existence of the limit for r < 1 is a simple consequence of the spectral decomposition of the transfer operator P s,r : where P s,r h s = λ s h s , P * s,r ν s = λ s ν s and λ −k s N k s → 0, k → ∞. For r = 1 the existence of the limit has been shown in [Kn4]. The continuity follows from standard convexity arguments.
2. By eventually passing to the common (for different s values) Banach space H ∞ (D 1 ) of functions analytic in the disk D 1 , (see (2.9)) and continuous on ∂D 1 , the family of operators P s,r : H ∞ → H ∞ becomes an analytic family of type A in the sense of Kato ([Ka], Chapter 7). Therefore, for s ∈ R, s < s cr (r), the function λ s defined in (5.9) is real analytic and monotonically decreasing. The other claimed properties of the function s cr (r) can be easily obtained by differentiating twice the logarithm of (5.10).
4. Concerning the last statement, note first that from the identity (3.4) it follows that the "grand canonical" energy function Q k = log q k : G k → R has the symmetry Q k (σ) = Q k (σ). Moreover, if we denote with 0 k = (0, 0, . . . , 0) ∈ G k , it is immediate to see that for an arbitrary function f on G n , we have Therefore putting these observations together with (4.8) and (5.5) we can write (5.14) If s > s cr , then the limit lim n→∞ Z C n (s) is finite and the factors (n − m − 2)/n in (5.14) go to one. Comparison of (5.6) with (5.14) immediately implies that lim n→∞ M n (s, r) exists and equals 1. If instead s < s cr , then the ferromagnetic property (Thm. 4.5) implies M n (s, r) ≥ 0.
( 5.15) We follow a similar strategy as in the proof of Lemma 9 of [CK], but now based on the transfer operator analysis. By (5.12) and (5.9) for 2s < s cr and ε ∈ 0, 1 2 (1 − ρ s /λ s ) (which is a nonempty interval since s → ρ s /λ s monotonically increases to 1 for 2s = s cr ) Using again the spectral decomposition (5.12) of the transfer operator and Corol-lary 5.2, With the lower bound (5.18) for Z C n (s) we obtain since lim n→∞ Z G n−1 (s) = ∞, and µ − > 1, this implies lim sup n→∞ M n (s, r) ≤ 0.
Together with (5.15) we see that the limit in (5.8) exists and equals 0.
Example 5.8 For r = 1 one finds [Kn3] lim where ζ(s) is the Riemann zeta function. Moreover one can show that Z C n (2) ∼ n 2 log n , n → ∞.

Fourier analysis of the transfer operator
Up to now we mainly analysed the action of the transfer operator on positive functions, related to the Perron-Frobenius eigenfunction. Now we are interested in the spectral gap and its disappearance for r ր 1. Therefore we extend Proposition 5.1 by applying P n s,r to e m (x) := e 2πimx .
Proposition 5.9 For all r ∈ [0, 2), x ∈ R + , s ∈ C, m ∈ Z and n ≥ 1 we have P n s,r e m (x) = ρ ns where the functions n 0 and n 1 satisfy: More specifically, for some choice of numbers 0 ≤ µ ≤ pr and 0 ≤ ν ≤ q.
Proof. For n = 1 we find we find, for i = 0, 1, The proof now proceeds by induction along the same lines as for Proposition 5.1.
A more precise characterization of the integers µ and ν appearing in the definition of the functions n 0 and n 1 would be of some interest (see however below, Proposition 5.11). Nevertheless, property (5.20), along with Lemma 5.3, is sufficient to have the following extension of Corollary 5.2: Corollary 5.10 For all r ∈ [0, 2), k ∈ N 0 , s ∈ C and m ∈ Z The proof of Proposition 5.19 extends at once to arbitrary complex functions f : [0, 1] → C. On the other hand we shall formulate and prove this more general result in a direct way, without employing the extended treeT (r).
Proof. By definition the transfer operator acts like with ρ = 2 − r. It is well-defined for the range 0 ≤ r < 2.

Twisted zeta functions
(5.30) We conclude by discussing further ζ's for general integer values of m restricting to the case r = 1.
For real x we set e x : C → C, e x (c) := e 2πixc . The multiplicative group of units in the ring Z/qZ is denoted by U (Z/qZ). It is of cardinality ϕ(q). We are interested in the functions µ (m) : N → C , µ (m) (q) := p∈U (Z/qZ) e m/q (p) (m ∈ Z, q ∈ N).
Proof. We set q ′ := q/ gcd(m, q), m ′ := m/ gcd(m, q). Then The third equality is due to the fact that for m ′ relatively prime to q ′ multiplication by m ′ only permutes the elements of U (Z/q ′ Z).
Next we consider the Dirichlet series ζ (m) (s) := ∞ n=1 µ (m) (n)n −s As |µ (m) (n)| ≤ n, we know that these series converges absolutely for Re(s) > 2. This is in fact also the abscissa of unconditional convergence if m=0.
Proof. This follows from Lemma 5.15 and the estimate ϕ(q) ϕ q gcd(m,q) ≤ m (5.31) (5.31) can be proven by taking the prime powers p a for m, since ϕ is multiplicative.
In that case we can also assume that q = p b , and the inequality follows from ϕ(p c ) = ϕ(p) p c−1 , valid for c ≥ 1.