On the Average Growth of Random Fibonacci Sequences

Benoît Rittaud Université Paris-13 Institut Galilée Laboratoire Analyse, Géométrie et Applications 99, avenue Jean-Baptiste Clément 93 430 Villetaneuse France

                 rittaud@math.univ-paris13.fr

Abstract We prove that the average value of the n-th term of a sequence defined by the recurrence relation g_{n} = |g_{n−1} ± g_{n−2}|, where the ± sign is randomly chosen, increases exponentially, with a growth rate given by an explicit algebraic number of degree 3. The proof involves a binary tree such that the number of nodes in each row is a Fibonacci number.

1 Introduction

A random Fibonacci sequence is a sequence (g_{n})_{n} in which g_{0} and g_{1} are arbitrary nonnegative real numbers and such that, for any n ≥ 2, one has g_{n} = |g_{n−1} ± g_{n−2}|, where the ± sign is randomly chosen for each n.

In 2000, Divakar Viswanath [6] proved that, in the set of random Fibonacci sequences equipped with the natural probabilistic structure (1/2, 1/2)^{⊗ℕ}, almost all random Fibonacci sequences are exponentially growing, with a growth rate equal to 1.13198824 . . .. Up to now, no analytic expression for this value was known.

In 2005, Jeffrey McGowan and Eran Makover [5] used an elementary idea to evaluate the growth rate of the average value of the n-th term of a Fibonacci sequence, using the formalism of trees. Thanks to Jensen’s inequality, this second growth rate is necessarily bigger than the value 1.13198824 …, which appears in Viswanath’s study, since this latter value corresponds to a growth rate in an almost-sure sense.

The first goal of the present article is to give an algebraic expression for the growth rate of the average of the n-th term of a random Fibonacci sequence. We use the formalism of trees, refining the McGowan-Makover construction [5], by considering the full binary tree of all possible random Fibonacci sequences starting from two fixed initial values. Our main result is the following

Theorem 1. For any fixed g_{0} and g_{1} (not both equal to zero), let us define m_{n} as the mean value of the n-th term of a random Fibonacci sequence starting from g_{0} and g_{1}. Then, the ratio m_{n+1}/m_{n} tends to α − 1 ≈ 1.20556943 as n goes to infinity, where α ≈ 2.20556943 is the only real number for which α^{3} = 2α^{2} + 1.

Let a and b be nonnegative real numbers. By the random Fibonacci tree of the pair (a, b), we mean the binary tree denoted by T_{(a,b)} and defined in the following way: a is the root, b its only child; if x is the parent of y, then y has two children, which are x + y and |x − y|. In other words, the possible walks in the tree T_{(a,b)} give the full list of random Fibonacci sequences (g_{n})_{n} such that g_{0} = a and g_{1} = b. In this formalism, the sequence (m_{n})_{n} can be characterized by the equality m_{n} = S_{n}/2^{n}, where S_{n} is the sum of all values in the n-th row of the tree.

The study of the sequence (S_{n})_{n} is made by considering another binary tree, which we will call the restricted random Fibonacci tree, denoted by R_{(a,b)}, which is the subtree of T_{(a,b)} obtained by cutting all redundant edges (a precise definition and the first few rows of R_{(1,1)} are given in subsection 2.3). This subtree, which to our knowledge has never been studied before, seems to have many interesting properties – in fact, it seems that it is even more interesting than random Fibonacci trees.

The present paper is organized in the following way: in section 1 we introduce basic facts about trees and initiate the study of the tree R = R_{(1,1)} in view of Theorem 1. Section 2 is devoted to the proof of Theorem 1. In section 3, we investigate more properties of the tree R, which has many arithmetical aspects that are of interest. In this section, we also focus our interest in some other trees derived from R. In section 4, we give some open questions and a heuristic formula which gives a link between trees T and R. This latter formula will be proved in another article [4], where the question of the growth rate of almost all random Fibonacci sequences is considered.

2 Definitions and fundamental results about trees

We start with a few simple relevant facts about trees that are of interest for us.

2.1 The tree T

It is easily shown that, for any positive numbers a, b and c, the trees T_{(ca,cb)} and T_{(a,b)} have the same nodes up to the multiplicative constant c, so, when a and b are integers (the only case of interest for us in this section), it is not restrictive to assume that a and b are relatively prime. Proposition 1 will show that it is, in fact, enough to focus our attention on T_{(1,1)}, which will simply be denoted by T in the following.

A pair (a, b) of natural numbers is said to appear in T (or, simply, appears) whenever there exists a node in T of value a with a child of value b.

Lemma 1. There exist two walks in T, denoted by 1^{−} and 1^{+}, such that 1^{−} is exactly composed of all the pairs of the form (1, 2n + 1) and (2n, 1) (n an integer) and 1^{+} composed of all the pairs of the form (2n + 1, 1) and (1, 2n).

Proof. We start from g_{0} = g_{1} = 1 and g_{2} = 2. A trivial calculation shows that, for all k ≥ 2, defining g_{k} by:

g_{k} = \{ \begin{matrix}g_{k−1} + g_{k−2}, & if k ≡ 1 or 2 (mod 3); \\ g_{k−1} − g_{k−2}, & if k ≡ 0 (mod 3); \end{matrix}

gives the walk 1^{−}. In the same way, if, for k ≥ 2, we define g_{k} as:

g_{k} = \{ \begin{matrix}g_{k−1} + g_{k−2}, & if k ≡ 0 or 2 (mod 3); \\ g_{k−1} − g_{k−2}, & if k ≡ 1 (mod 3); \end{matrix}

then we get 1^{+}.

Proposition 1. A pair of positive integers (a, b) appears in T if and only if a and b are relatively prime. In T, the only appearing pair of integers (a, b) with ab = 0 are (0, 1) and (1, 0).

Proof. We start by proving the second part. If, for example, a = 0 and b ≠ 0 are such that (a, b) appears, then, the parent of 0 is b, the parent of this parent is b again, then either 0 or 2b, etc. In any case, we get multiples of b as successive ancestors; since the beginning of T is 1 − 1 − 0, we must have b = 1.

Let us prove now the first part. A pair (a, b) appearing in T being given such that ab ≠ 0, let d be the greatest common divisor of a and b. Let z be the parent of a. Since we have b = |z − a| or b = z + a, d is also the greatest common divisor of z and a. By induction, d is the greatest common divisor of 1 (the root of T), and 1 (the child of the root), so d = 1.

Conversely, let a ≠ b be two relatively prime integers. We input them to the Euclidean algorithm: we write r_{0} for a, r_{1} for b and, for any i ≥ 0 such that r_{i+1} ≠ 0, we define r_{i+2} as the only integer in [0, r_{i+1}[ for which there exists an integer n_{i} such that r_{i} = n_{i}r_{i+1} + r_{i+2}. Let us denote by N the index such that r_{N} = 0. Since a and b are relatively prime, we have r_{N−1} = 1 so, thanks to Lemma 1, the pairs (r_{N−1}, r_{N−2}) and (r_{N−2}, r_{N−1}) both appear in T.

Let assume now that the pairs (r_{i+1}, r_{i}) and (r_{i}, r_{i+1}) both appear, for an i ≤ N − 2. Starting from (r_{i+1}, r_{i}), we consider the walk obtained by two additions, one subtraction,

again two additions, one subtraction, etc. This gives the sequence r_{i+1}, r_{i}, r_{i}+r_{i+1}, 2r_{i}+r_{i+1}, r_{i}, 3r_{i} + r_{i+1}, etc. so the proof splits in two cases: if n_{i−1} is odd, then we obtain the pair (r_{i}, n_{i−1}r_{i} + r_{i−1}) = (r_{i}, r_{i−1}). If n_{i−1} is even, then we obtain the pair (r_{i}, (n_{i−1} − 1)r_{i} + r_{i+1}), that is, (r_{i}, r_{i−1} − r_{i}). The next elements of the walk are, then, r_{i} + (r_{i−1} − r_{i}) = r_{i−1}, then |r_{i−1} − (r_{i−1} − r_{i})| = r_{i}, so we get the pair (r_{i−1}, r_{i}).

Similar reasoning holds when we start from (r_{i}, r_{i+1}). One addition, one subtraction, then two additions, one subtraction, two additions, one subtraction, etc. gives the sequence r_{i}, r_{i+1}, r_{i} + r_{i+1}, r_{i}, 2r_{i} + r_{i+1}, 3r_{i} + r_{i+1}, r_{i}, 4r_{i} + r_{i+1}, etc., so if n_{i−1} is even we finally get the pair (r_{i}, r_{i−1}). If n_{i−1} is odd, we get the pair (r_{i}, r_{i−1} − r_{i}). An addition followed by a subtraction then gives the pair (r_{i−1}, r_{i}).

In conclusion, starting from (r_{i+1}, r_{i}) and (r_{i}, r_{i+1}) respectively, we obtain (r_{i}, r_{i−1}) and (r_{i−1}, r_{i}) if n_{i−1} is odd, (r_{i−1}, r_{i}) and (r_{i}, r_{i−1}) if n_{i−1} is even, and the proposition is thus proved by induction.

Recall that ⌊x⌋ denotes the integer part of x. We can sum up the previous construction in the following way:

• if n_{i−1} is odd, then

– starting from (r_{i}, r_{i+1}), we attain (r_{i−1}, r_{i}) in 2 + 3 · ⌊n_{i−1}/2⌋ steps;

– starting from (r_{i+1}, r_{i}), we attain (r_{i}, r_{i−1}) in 1 + 3 · ⌊n_{i−1}/2⌋ steps;

• if n_{i−1} is even, then

– starting from (r_{i}, r_{i+1}), we attain (r_{i}, r_{i−1}) in 3n_{i−1}/2 steps;

– starting from (r_{i+1}, r_{i}), we attain (r_{i−1}, r_{i}) in 3n_{i−1}/2 steps.

It is easily seen that if the pair (a, b) appears in T_{(c,d)}, then the full tree T_{(a,b)} appears in T_{(c,d)}, in an obvious sense. The following shows a “self-containment” aspect of random Fibonacci trees.

Proposition 2. For any positive integers a and b relatively prime, T_{(a,b)} appears infinitely many times in T.

Proof. Proposition 1 shows that any pair of the form (a, b) where a and b are relatively prime appears in T. It is then enough to show that T appears in T_{(a,b)}. We consider a random Fibonacci sequence (g_{n})_{n} such that g_{0} = g_{1} = 1, g_{n−1} = a and g_{n} = b for an n. For k > 0, we then define g_{n+k} as |g_{n+k−1} − g_{n+k−2}|.

It is easily seen that, for any integers u and v, we always have max(|v−u|, v) ≤ max(v, u), with equality iff these maxima are both equal to v. The equality case cannot, therefore, occur for two successive pairs of g_{n+k}. As a consequence, we get that there is a k ≤ 2n such that g_{n+k} = g_{n+k+1} = 1, and we are done.

As a corollary, we get the following result:

Corollary 1. Any pair appearing in T appears infinitely many times in T.

Therefore, if a and b are relatively prime, the random Fibonacci tree generated by a with a child b is a subtree of T. Recall that, if this is not the case, and d > 1 is the greatest common divisor of a and b, then T_{(a,b)} is homothetic to T_{(a/d,a/d)} which, by the previous proposition, is a subtree of T.

Here is the beginning of the random Fibonacci tree T. For a node a with child b, the right child of b is b + a and the left child is |b − a|.

11 0  2 1  1 1  1  1  1 0 2 0 2 0 2 0 2 1 1 1 3 1 1 1 3 1 1 1 3 1 1 1 3^{1} ^{1} ^{1} ^{1} ^{1} ^{3} ^{1} ^{5} ^{1} ^{1} ^{1} ^{1} ^{1} ^{3} ^{1} ^{5} ^{1} ^{1} ^{1} ^{1} ^{1} ^{3} ^{1} ^{5} ^{1} ^{1} ^{1} ^{1} ^{1} ^{3} ^{1} ^{5}  1  3 1  3  1  5 0 2 2 4 2 4 2 8 1 1 1 3 1 5 1 7 1 3 3 5 3 7 3 13^{1} ^{1} ^{1} ^{1} ^{1} ^{3} ^{1} ^{5} ^{1} ^{3} ^{3} ^{7} ^{3} ^{5} ^{3} ^{11} ^{1} ^{3} ^{1} ^{5} ^{1} ^{7} ^{1} ^{9} ^{1} ^{5} ^{5} ^{9} ^{5} ^{11} ^{5} ^{21}

Figure 1: The random Fibonacci tree T = T_{(1,1)}

Let us mention, without further elaboration, that the sequence of labels in the tree read in breadth-first order (1, 1, 0, 2, 1, 1, 1, 3, 1, 1, 1, 1, 1, 3, 1, 5…), gives an example of a 2-regular sequence in the terminology given by Allouche and Shallit [2, 3] (see also section 2.3 of the present article, after Figure 2).

2.2 Shortest walks in T

By a shortest walk from the root of T to a pair (a, b) appearing in T, we mean a random Fibonacci sequence such that there is an n for which g_{n} = a, g_{n+1} = b and n is the smallest integer for which such a random Fibonacci sequence exists.

Proposition 3. The random Fibonacci sequence constructed in the proof of Proposition 1 gives the only shortest walk in T from the root to the pair (a, b).

Proof. To prove this proposition we need the following

Lemma 2. Let the pair (a, b) appear in T. Let us consider the set of all pairs (c, d) of possible ancestors of (a + b, a) in T such that the ascending walk from (a, b) to (c, d) does not show the pair (a, b). For all such (c, d), there exist four integers, m, m′, n and n′, such that c = ma + nb and d = m′a + n′d, |mn′ − m′n| = 1 (in particular, m and m′ are relatively prime, and so are n and n′) and such that m > m′ ⟹ n ≥ n′ and n > n′ ⟹ m ≥ m′.

In this lemma, the “possible ancestors” of (a + b, a) are the pairs of integers appearing in T and having (a + b, a) as successors. In other words, these are the elements of the set of all ancestors of all pairs of nodes with value a + b at parent’s position and a for child’s position (and, so, b for grandchild).

Proof. The property is routinely verified for the first nodes of the “ascending tree” starting from (a + b, a). Let us start from the pair (ma + nb, m′a + n′b). The possible parents of ma + nb are (m + m′)a + (n + n′)b, for which the required properties are trivially verified, and d := |(m − m′)a + (n − n′)b|. Let us consider this second case.

Since m > m′ implies n ≥ n′ and n > n′ implies m ≥ m′, we have d = |m−m′|a+|n−n′|b. In any case, the property |mn′ − m′n| = 1 is verified for (d, ma + nb).

Let us show now that |m − m′| > m implies |n − n′| ≥ n and that |n − n′| > n implies |m − m′| ≥ m. The symmetry of the problem allows us to prove only one of these two implications: let us do for example the first one. We thus assume that |m − m′| > m and wish to prove that |n − n′| ≥ n.

Since m and m′ are integers, the inequality |m−m′| > m implies that m′ = 2m+z, where z is a positive integer. We thus have ±1 = mn′−m′n = mn′−(2m+z)n = m(n′−n)−(m+z)n, so m(n′ − n) = ±1 + (m + z)n. First, if m ≠ 0, then we get n′ − n = n + \frac{±1+zn}{m}. Since we can assume n ≠ 0 (else the relation |n − n′| ≥ n is trivial), we have ±1 + zn ≥ 0, so the equality n′ − n = n + \frac{±1+zn}{m} implies n′ − n ≥ n. Second, if m = 0, then the equality ±1 = mn′ − m′n implies m′ = n = 1. The only case for which the relation |n − n′| ≥ n is false is, then, the case n′ = 1, so we get (d, ma + nb) = (a, b), which contradicts the hypothesis, so Lemma 2 is proved.

Lemma 2 has this important consequence:

Corollary 2. (characterization of shortest walks) Let (a, b) be a pair appearing in T. The shortest way in T from the root to the pair (a, b) is characterized by the following property: for any pair (c, d) appearing in this walk, the parent of c is |c − d|.

Proof. Let (c, d) be a pair appearing in T which belongs to the shortest walk from the root to the pair (a, b). If the parent of c is c + d then, by the previous Lemma, either all the ancestors of c + d are of the form mc + nd with m and n positive integers, or the pair (c, d) appears among the ancestors of (c + d, d). The first case is impossible since the walk could not thus start from the pair (1, 1) which is at the beginning of the tree; the second case is in contradiction with the assumption that the walk in consideration is the shortest from (1, 1) to (a, b). So, considering the pair (c, d) appearing in T, the parent of c is necessarily |c − d|, and the corollary is proved.

To conclude the proof of Proposition 3, it is then enough to verify that the walk constructed in the proof of Proposition 1 verifies the previous characterization property. This fact is routinely verified.

The definition of the random Fibonacci tree implies that whenever we see two nodes both equal to 1, the first being the parent of the second, the successive children which appear next show the full tree. To avoid repetition in the tree, we will now focus our attention to the subtree, denoted by R, which avoid redundances.

2.3 The tree R

We consider the tree R defined as the subtree of T made of all shortest walks. In other words, we start from 1, with only child 1. Then, the (n − 1) first rows being constructed, the n-th one is made of the nodes b such that, denoting by a their parent, the pair (a, b) did not already appear upper in the subtree (that is no row before the n-th one shows the pair (a, b)). The tree R is the restricted subtree of T. We denote by r(a, b) the value of the row in which the edge containing a as a parent and b as a child appears in the tree R.

Lemma 3 ensure that the definition of R is non-ambiguous, at a single exception which is treated in Lemma 4.

Lemma 3. Any edge (a, b) appearing in T appears only once in the row r(a, b), apart from the pair (0, 1) which appears twice in the second and third rows.

Proof. The case of the pair (0, 1) is manually treated. Apart from this case, we know from the characterization of shortest walks that the shortest walk in T from the root to the pair (a, b) is such that, for any pair (c, d) appearing in this walk, c’s parent is |d − c|, so this walk is unique and Lemma 3 is proved.

Lemma 4. The value zero appears only once in R and has no grandchild.

Proof. By Proposition 1, the value 0 appears only as a child of 1, so, by definition of R, it cannot appears twice. Its children in T are 1 and 1 (this is the ambiguity case in the definition of R), whose children in T are also 1 and 1 and have to be exclude from R since the pair (1, 1) already appears in the root of R.

Lemma 4 indicates that the node 0 of R can be removed. In the following, this node (and its children) are not considered as elements of R. We will call R̃ the tree obtained by adding to R the node 0 corresponding to the left child of the second 1. The tree R̃ will be useful to investigate the positions of the 0 nodes in T (see section 4.2).

Here are the first few rows of R. As in the case of T, a left child corresponds to a subtraction and a right child to an addition. When a node has only one child, we use a vertical line; Lemma 5 will show that such a vertical edge always corresponds to an addition.

112 1  3 3  1  5 2  4  4  2  8 5  1  7  3  5  7  3  13 3  7  5  3  11  7  1  9  5  9  11  5  21 8 2 12 4 6 10 4 18 4 10 6 4 14 12 2 16 8 14 18 8 34 5 11 9 5 19 9 1 11 7 13 15 7 29 11 3 17 5 7 13 5 23 7 17 11 7 25 19 3 25 13 23 29 13 55^{13} ^{3} ^{19} ^{7} ^{11} ^{17} ^{7} ^{31} ^{5} ^{13} ^{7} ^{5} ^{17} ^{17} ^{3} ^{23} ^{11} ^{19} ^{25} ^{11} ^{47} ^{7} ^{15} ^{13} ^{7} ^{27} ^{11} ^{1} ^{13} ^{9} ^{17} ^{19} ^{9} ^{37} ^{19} ^{5} ^{29} ^{9} ^{13} ^{23} ^{9} ^{41} ^{11} ^{27} ^{17} ^{11} ^{39} ^{31} ^{5} ^{41} ^{21} ^{37} ^{47} ^{21} ^{89} ρ_{1} ρ_{2} ρ_{3} ρ_{4} ρ_{5} ρ_{6} ρ_{7} ρ_{8} ρ_{9} ρ_{10}

Figure 2: The restricted tree R = R_{(1,1)}

Let us remark, again without further elaboration, that the sequence of labels in the tree R, read in breadth-first order (1, 1, 2, 1, 3, 3, 1, 5, 2, 4, 4, 2, 8…) is a β-regular sequence, as defined by Allouche, Scheicher and Tichy [1], where here β is the numeration system defined by the Fibonacci sequence.

Notation 1. Let a be a node of R. If a has a left (resp. right) child, it is denoted by c^{−}(a) (resp. c^{+}(a)).

Lemma 5. In R, if b is the left child of a, then b has no left child.

Proof. Let assume that we can find three nodes x, y and z such that z = c^{−}(y) and y = c^{−}(x). By considering successive parents if necessary, we can suppose that x = c^{+}(w).

Let v be the parent of w. Then, we have x = v + w, so y = |x − w| = v and z = |y − x| = |v − (v + w)| = w, so (y, z) = (v, w), which contradicts the non-redundance in the definition of R.

Lemma 6. In R, if a has b as a right (resp. left) child, then b is smaller (resp. bigger) than a. The only case of equality corresponds to the pair (1, 1) in the beginning of the tree.

Proof. Let us denote by z the parent of a. If b = c^{+}(a), then it is obvious that b > a since, apart for nodes in the top of the tree, we have b = a + z and z > 0 by Lemma 4 (and the exclusion of the 0-node we made after this lemma).

If b = c^{−}(a), then (if a is not the root of R), by Lemma 5 we have a = c^{+}(z) so, by the beginning of the proof, a > z, so b = a − z < a, and the proof is complete.

Lemma 7. In R, every node has a right child.

Proof. Let us consider the node b, which parent is a. In T, the right child of b is a + b. It remains to show that the shortest walk in T from the root to (b, a + b) is such that b has a as parent. But this is a simple consequence of the characteristic property of shortest walks (Corollary 2): the parent of b is |(a + b) − b| = a.

Lemma 8. In R, if the node a has b as only child, then b has two children.

Proof. By Lemma 7, b = c^{+}(a). By Lemma 7 again, b has a right child, which is a + b. In T, the left child of b is |a − b|, which is equal to b − a by Lemma 6. Again by the characteristic property of shortest walks, the parent of b in the shortest walk to (b, b−a) is |b−(b−a)| = a, and we are done.

Lemma 9. In R, if the node b is a right child, then it has two children.

The proof goes as in Lemma 8.

Notation 2. The set of edges from the (n − 1)-th to the n-th row of R is denoted by ρ_{n} (by convention, the root defines the 0-th row, so the edge from the root 1 to its only child 1 corresponds to ρ_{1}, the next one from 1 to 2 coresponds to ρ_{2}, and so on). In ρ_{n}, the subset of left (resp. right) edges is denoted by ρ_{n}^{−} (resp. ρ^{+}(n)). A set X of edges in R being given, we denote by c(X), c^{−}(X) and c^{+}(X) respectively the set of children, left children and right children of X in R. We also denote by S(X) the sum of the values of all the final nodes of X.

We denote by (F_{n})_{n} the classical Fibonacci sequence: F_{0} = 0, F_{1} = 1 and, for all n ≥ 2, F_{n} = F_{n−1} + F_{n−2}.

We can now give two quite unexpected properties of R.

Proposition 4. For all n ≥ 2, we have

Card(ρ_{n}^{−}) = F_{n−2}  and  Card(ρ_{n}^{+}) = F_{n−1},

and so

Card(ρ_{n}) = F_{n}.

Proof. The property is easily verified for the first rows. Let assume that the property is true for all rows until the (n − 1)-th one. By Lemma 7, we have Card(ρ_{n−1}) = Card(c^{+}(ρ_{n−1})) = Card(ρ_{n}^{+}), so Card(ρ_{n}^{+}) = F_{n−1}. By Lemmas 8 and 9, we have Card(ρ_{n}^{−}) = Card(ρ_{n−1}^{+}) = Card(ρ_{n−2}) = F_{n−2}, so we are done.

Proposition 5. Let us define G_{n} as S(ρ_{n}) for all n ≥ 1. One has G_{1} = 1, G_{2} = 2, G_{3} = 4 and, for any n > 3, G_{n} = 2G_{n−1} + G_{n−3}.

Proof. We write G_{n}^{−} (resp. G_{n}^{+}) for S(ρ_{n}^{−}) (resp. S(ρ_{n}^{+})). Lemmas 5, 6 and 9 imply the relation G_{n}^{−} = G_{n−1}^{+} − G_{n−2}. We split the edges of ρ_{n}^{+} in two subsets: the one, say σ_{n}^{+}, is composed by the edges which are children of elements of ρ_{n−1}^{+}, the other, σ_{n}^{−}, is composed by the edges which are children of elements of ρ_{n−1}^{−}. Lemma 7 implies that S(σ_{n}^{+}) = G_{n−1}^{+}+G_{n−2}, Lemmas 5 and 9 that S(σ_{n}^{−}) = G_{n−1}^{−} + G_{n−2}^{+}. Thus, we get

G_{n} = G_{n}^{−} + G_{n}^{+} = G_{n}^{−} + S(σ_{n}^{−}) + S(σ_{n}^{+})
= (G_{n−1}^{+} − G_{n−2}) + (G_{n−1}^{−} + G_{n−2}^{+}) + (G_{n−1}^{+} + G_{n−2})
= 2G_{n−1}^{+} + G_{n−1}^{−} + G_{n−2}^{+}
= 2G_{n−1} + G_{n−2}^{+} − G_{n−1}^{−}
= 2G_{n−1} + G_{n−3},

the relation G_{n−2}^{+} − G_{n−1}^{−} = G_{n−3} coming from Lemmas 5, 6, 7 and 9.

The same kind of study shows that, more generally, if we write v_{n} = α_{n}a + β_{n}b for the sum of the n-th row of the general restricted tree, then we have

α_{0} = 1 α_{1} = 0 α_{2} = 1 α_{3} = 2 α_{n} = 2α_{n−1} + α_{n−3} for n ≥ 4 (so α_{n} = G_{n−1}),
β_{0} = 0 β_{1} = 1 β_{2} = 1 β_{3} = 2 β_{n} = 2β_{n−1} + β_{n−3} for n ≥ 3.

Corollary 3. Let us denote by m̃_{n} the average value of an element of the n-th row of R. As n goes to infinity, the ratio m̃_{n+1}/m̃_{n} tends to α/φ ≈ 1.363117, where α is the only real zero of the equation x^{3} = 2x^{2} + 1 and φ the golden ratio.

Proof. Classical facts about linear recurring sequences show that the ratio G_{n+1}/G_{n} tends to α as n tends to infinity. Since Proposition 4 shows that m̃_{n} = G_{n}/F_{n}, we get m̃_{n+1}/m̃_{n} = (G_{n+1}/G_{n}) · (F_{n+1}/F_{n}) and the result follows from the fact that F_{n+1}/F_{n} tends to φ as n goes to infinity.

2.4 Projection of walks of T into walks of R

A (finite) walk in T can be represented as a finite sequence (w_{i})_{0≤i≤N} of + and − signs. To such a sequence is associated the random Fibonacci sequence (g_{n})_{n} defined by g_{0} = g_{1} = 1 and, for all n ≥ 2, g_{n} = g_{n−1} + g_{n−2} iff w_{n−2} = +. A finite walk (w_{i})_{0≤i≤N} being given, we generically denote by (g_{i})_{0≤i≤N} the associated random Fibonacci sequence, that is the values of the nodes successively attained in T by this walk.

The following proposition gives a way to transform a walk in T into a walk on R.

Lemma 10. For N ≥ 2, let (w_{n})_{0≤n≤N} be a finite walk in T such that a minus sign is never followed by another minus sign, apart for w_{N−1} and w_{N} (both minus signs). Denoting by (g_{i})_{0≤i≤N+2} the corresponding node sequence, we have (g_{N+2}, g_{N+1}) = (g_{N−1}, g_{N}).

Proof. The assumption made on (w_{i})_{0≤i<N}, together with Lemmas 5, 7 and 9 imply that the walk (w_{i})_{0≤i<N} is a walk in R as well as a walk in T. By Lemma 6, we thus have g_{N+1} < g_{N}, so g_{N+2} = g_{N} − g_{N+1}. By the characterization of shortest walks (Corollary 2), we have also g_{N−1} = g_{N} − g_{N+1} (so g_{N−1} = g_{N+2}) and g_{N−2} = |g_{N−1} − g_{N}| = g_{N+1}, so we are done.

The previous lemma means that the left child in T of a left child b in R can simply be seen as b’s grandparent. For certain walks in T, it is thus possible to define a corresponding walk in R, obtained by cutting every succession of + − − (note that such a cut may make another +−− appear to be itself removed, and so on). For example, the walk +−++−−−− in T gives the walk +− in R.

The walks in T for which some attained nodes have the value 0 do not correspond to a walk in R, since R do not contain any node equal to 0. Conversely, to any walk in T for which a_{i} ≠ 0 for all i corresponds a walk in R. (To be able to project any walk in T into a walk in a non-redundant tree, it would be possible to consider R̃ instead of R.)

3 Proof of Theorem 1

In the following, R is considered as a subset of T.

Notation 3. For any subset X of edges of T, we denote by s(X) (for successor) the set of all edges which are children of elements of X in T. If X and Y are two subsets of T (non necessarily disjoint), we write X + Y for the disjoint union of X and Y. The disjoint union X + X is written as 2X and, more generally, mX stands for the union of m disjoint copies of X. In the following, we will identify the set mX with the set obtained by multiplying each element of X by m (that is: for the edge e limited by the nodes a and b, 2e can be seen as the edge limited by 2a and 2b); this interpretation of mX allows us to extend the notation to zX, where z is any real number.

Recalling that ρ_{n} denotes the n-th row of edges of R, we denote by ρ_{n}^{(a,b)} the n-th row of edges of R_{(a,b)}, τ_{n} the n-th row of edges of T and τ_{n}^{(a,b)} the n-th row of edges of T_{(a,b)}.

The proof of Theorem 1 runs as follow:

• Step 1: show that the growth rate of ρ_{n}^{(a,b)} is the same for any pair (a, b) such that ab ≠ 0;

• Step 2: give an explicit expression of τ_{n}^{(a,b)} in terms of ρ_{k}^{(|b−a|,a)} (with k ≤ n) in the cases (a, b) = (1, φ) and (a, b) = (1, φ^{−1}) (with a slight abuse of notation which will be explained soon) (recall that φ = (1 + \sqrt{5})/2);

• Step 3: deduce from step 2 the explicit growth rate of the sequences (S(τ_{n}^{(a,b)}))_{n} for the two pairs (1, φ) and (1, φ^{−1}) (we find the same growth rates in the two cases);

• Step 4: deduce from the linearity of the function (a, b) ⟼ (τ_{n}^{(a,b)})_{n} that the growth rate found in step 3 is also the growth rate of the sequence (S(τ_{n}^{(a,b)}))_{n} for any pair (a, b).

The growth rate found in step 4 will correspond to the value α − 1 mentioned in the statement of Theorem 1, so step 4 will conclude the proof.

3.1 Step 1: the growth rate of ρ_{n}^{(a,b)} does not depend on (a, b)

It is a simple consequence of the remark made after the proof of Proposition 5: since, for any pair (a, b), the sequence (S(ρ_{n}^{(a,b))})_{n} is a linear combination of two linear recurring sequences both defined by their three first terms and the recurrence property u_{n+1} = 2u_{n} + u_{n−2}, the growth rate of this sequence is the same for all pairs (a, b) (with ab ≠ 0), and this growth rate is α, the only real zero bigger than 1 of the equation x^{3} = 2x^{2} + 1.

3.2 Step 2: an explicit expression of τ_{n}^{(a,b)} in terms of ρ_{k}^{(|b−a|,a)} for (a, b) = (1, φ) or (1, φ^{−1})

Let us explain first the slight abuse of notation: in the case b = φ^{−1}, the tree R_{(|b−a|,a)} is not a subtree of T_{(a,b)} (even after removing its root), since the child of the node a in R_{(|b−a|,a)} is not b = φ^{−1} but 1 + φ^{−2}. Since the recurring properties of restricted trees do not depend on the value of their root, this abuse of notation is of no consequence, and we’ll keep it for simplicity.

In the following, we sometimes write τ_{n} and ρ_{n} instead of τ_{n}^{(a,b)} and ρ_{n}^{(|b−a|,a)}, the context fixing either that the assertions are true for all pairs (a, b) or only for some explicit pairs (a, b).

Lemma 10 has the following easy an useful consequence:

Lemma 11. For all n > 3, we have s(ρ_{n}) = ρ_{n+1} + ρ_{n−2}.

Let us consider now the beginning of the trees T_{(1,φ)} and T_{(1,φ^{−1})} (where ρ_{2} = ρ_{2}^{(φ^{−1},1)} for the left figure and ρ_{2} = ρ_{2}^{(φ^{−2},1)} for the right one, with the previous abuse of notation in this latter case).

1 φ φ^{−1}  φ^{2} 1  φ + φ^{−1}  1  φ^{3} ρ_{2} φ^{−1}ρ_{2}  1 φ^{−1} φ^{−2}  φ φ^{−3}  1  1  φ + φ^{−1} ρ_{2} φ^{−2}ρ_{2}
Figure 3: The trees T_{(1,φ)} and T_{(1,φ^{−1})}.

We’re interested in the sequence s^{n}(ρ_{2}^{(|b−a|,a)}) for (a, b) = (1, φ) and (1, φ^{−1}). Let us define z as z := |b − a|: we thus have z = φ^{−1} for b = φ and z = φ^{−2} for b = φ^{−1}. Together with the rules given in Lemma 11, we have the following rules for b = φ or φ^{−1}:

s(ρ_{2}^{(z,1)}) = ρ_{3}^{(z,1)},
s(ρ_{3}^{(z,1)}) = ρ_{4}^{(z,1)} + zρ_{2}^{(z,1)}.

Let us define, for all integer m ≥ 2

ν_{m} := ∑_{i=0}^{⌊m/2⌋−1} z^{i}ρ_{m−2i}.

Lemma 12. For (a, b) := (1, φ) or (1, φ^{−1}), we have s(ν_{2}) = ν_{3}, s(ν_{3}) = ν_{4} and, for all m ≥ 4:

s(ν_{m}) = ν_{m+1} + ν_{m−2}.

Proof. It is a simple application of Lemma 11 and the previous rules for s(ρ_{2}) and s(ρ_{3}).

We then get the desired link between the rows of R_{(|b−1|,1)} and T_{(1,b)} for b = φ or φ^{−1}.

Proposition 6. For all n ≥ 0 and (a, b) = (1, φ) or (1, φ^{−1}) we have:

τ_{n+2} = s^{n}(ρ_{2}) = ∑_{m=0}^{⌊n/3⌋} (\binom{n}{m} − 2\binom{n}{m − 1}) ν_{n+2−3m}.

Before proving it, let us give the following combinatorial interpretation of this proposition: the set ν_{n+2−3m} is the set of nodes attained by walks of length n in the random Fibonacci tree such that the projection of such a walk in the restricted tree is obtained by the cut of m sequences + − −. The value \binom{n}{m} − 2\binom{n}{m−1} corresponds to the number of such walks leading to all nodes whose projection in the restricted tree (see subsection 2.4) are equal to a fixed node.

Proof. We write c_{n,m} for \binom{n}{m} − 2\binom{n}{m−1}: a classical relation in Pascal’s triangle shows that c_{n,m} + c_{n,m+1} = c_{n+1,m+1} for any n and m.

The desired property is easily verified for the first values of n. Let assume for example that the property is true until n = 3k where k is a positive integer. Thus, by Lemma 12, and the induction hypothesis, we get

τ_{n+3} = s(s^{n}(ρ_{2}))
= s (∑_{m=0}^{k} c_{n,m}ν_{n+2−3m})

= s(c_{n,k}ν_{2}) + ∑_{m=0}^{k−1} c_{n,m} · (ν_{n−3(m−1)} + ν_{n−3m})

= c_{n,k}ν_{3} + c_{n,0}ν_{n+3} + c_{n,k−1}ν_{n−3(k−1)} + ∑_{m=0}^{k−2}(c_{n,m+1} + c_{n,m})ν_{n−3m}

= (c_{n,k} + c_{n,k−1})ν_{3} + ∑_{m=−1}^{k−2}(c_{n,m+1} + c_{n,m})ν_{n−3m}

= c_{n+1,k}ν_{3} + ∑_{m=−1}^{k−2} c_{n+1,m+1}ν_{n−3m}

= ∑_{m=0}^{k} c_{n+1,m}ν_{(n+1)+2−3m}.

The same calculation works when n = 3k + 1. When n = 3k + 2, it also works, with the use of the complementary fact, routinely proved, that for any integer N, the equality c_{3N,N} = c_{3N−1,N−1} holds (one has to apply then this equality to N = k + 1). (To be fully convinced, the reader is strongly encouraged to write the first τ_{n}s in terms of ρ_{i}s with the help of Lemma 6 and arrange these terms in a convenient way to show the ν_{i}s.)

It is interesting to remark that, as a simple calculation shows, the set [1, ⌊n/3⌋] in which i varies in the formula given in Proposition 6 is exactly the set of integers i for which the quantity \binom{n}{i}−2\binom{n}{i−1} is positive. The following proof of Theorem 1 seems to us not as elegant as Proposition 6, and we should expect a less technical way to conclude - a way that, at now, we failed to found.

3.3 Step 3: an explicit expression of the growth rate of S(τ_{n}^{(1,φ)}) and S(τ_{n}^{(1,φ^{−1})})

We know by elementary theory of linear recurring sequences that any sequence (u_{n})_{n} such that u_{n} = 2u_{n−1} + u_{n−3} for all n verifies that there exists μ ∈ ℝ and ν ∈ ℂ depending only on the three first terms of (u_{n})_{n} and such that, for any n:

u_{n} = μα^{n} + νβ^{n} + \overline{ν}\overline{β}^{n},

where α is the real zero of the equation x^{3} = 2x^{2} + 1 and β and \overline{β} the complex ones. A calculation shows that α ≈ 2.2055694 and that β ≈ −0.1027847 + 0.6654569i. Thus, the part νβ^{n} + \overline{ν}\overline{β}^{n} in the expression of u_{n} goes exponentially fast to zero. More precisely we have, up to a multiplicative constant, the estimation |νβ^{n} + \overline{ν}\overline{β}^{n}| ≤ |β|^{n} ≈ 0.673348^{n}.

The definition of ν_{n} given before Lemma 12 leads, then, to an expression of S(ν_{n}) composed of three parts, all of them being obtained by replacing in the right side of the equality all ρ_{k}s by α^{k}, β^{k} or \overline{β}^{k} and introduce the multiplicative constant μ, ν or \overline{ν}. Our first goal is to prove that the parts with β and \overline{β} can be removed from the study. For any number x, we have, by an elementary calculation:

σ_{m}(x) := ∑_{i=0}^{⌊m/2⌋−1} z^{i}x^{m−2i} = x^{m} · \frac{1 − (zx^{−2})^{⌊m/2⌋}}{1 − zx^{−2}} .

This sequence is, roughly speaking, exponential with ratio x when |zx^{−2}| < 1 and exponential with ratio z^{1/2} if |zx^{−2}| > 1 (it is not exactly true in the latter case, where we should take into account the presence of a complementary factor x^{m−2⌊m/2⌋}; the reader can ensure that this abuse is not important, since the cases for which it occurs will leave to negligible sequences in what follows).

Let us now define the following sequence:

Σ_{n}(x) := ∑_{m=0}^{⌊n/3⌋} c_{n,m}σ_{n+2−3m}(x).

We can then write, up to a multiplicative constant for each term in the right side of the equality:

S(τ_{n+2}) = Σ_{n}(α) + Σ_{n}(β) + Σ_{n}(\overline{β}).

For any x we have

(1 − zx^{−2})Σ_{n}(x)
= ∑_{m=0}^{⌊n/3⌋} c_{n,m} · x^{n+2−3m} · (1 − (zx^{−2})^{⌊(n+2−3m)/2⌋})

= ( ∑_{m=0}^{⌊n/3⌋} c_{n,m}x^{n+2−3m}) − ( ∑_{m=0}^{⌊n/3⌋} c_{n,m}x^{n+2−3m−2⌊(n+2−3m)/2⌋}z^{⌊(n+2−3m)/2⌋}) .

We denote by Z_{n}(x) the first sum in the right side, and by Z′_{n}(x) the second one.

Since |z| < 1, for any x ≥ 0 we have

Z′_{n}(x) ≤ x ∑_{m=0}^{⌊n/3⌋} c_{n,m} ≤ x ∑_{m=0}^{⌊n/3⌋} \binom{n}{m} ≤ x ∑_{m=0}^{n} \binom{n}{m} ≤ x · 2^{n}.

The same calculation shows that |Z_{n}(β)| and |Z_{n}(\overline{β})| are both upper-bounded by a sequence of the form c · 2^{n}, where c is a real number independant from n.

Writing S(τ_{n+2}) as Σ_{n}(α) + Σ_{n}(β) + Σ_{n}(\overline{β}), we get that S(τ_{n+2}) = Z_{n}(α) + c_{n} · 2^{n}, where c_{n} is uniformly bounded. Let us now study the sequence defined by Z_{n}(α). We have

\frac{Z_{n}(α)}{α^{n+2}} = ∑_{m=0}^{⌊n/3⌋} \binom{n}{m}(α^{−3})^{m} − 2α^{−3} ∑_{m=0}^{⌊n/3⌋} \binom{n}{m − 1}(α^{−3})^{m−1}

= \binom{n}{⌊n/3⌋}(α^{−3})^{⌊n/3⌋} + (1 − 2α^{−3}) ∑_{m=0}^{⌊n/3⌋−1} \binom{n}{m}(α^{−3})^{m}.

Up to a multiplicative constant, the first term of the right side of the latter equality is, by

Stirling’s formula, equivalent to \frac{1}{\sqrt{n}} · (\frac{3}{2^{2/3}α})^{n}, which tends to zero as n goes to infinity.

We can therefore neglect this term, since the second one is lower-bounded by a positive constant.

Now, then, we focus our attention to this latter term, denoted by Z̃_{n}. Our aim is to prove that it is exponentially increasing, with a growth rate equal to 1 + α^{−3}. Let assume first that ⌊(n + 1)/3⌋ = ⌊n/3⌋ = k + 1. Then, we have

\frac{Z̃_{n+1}}{Z̃_{n}} = \frac{∑_{m=0}^{k} \binom{n+1}{m}(α^{−3})^{m}}{∑_{m=0}^{k} \binom{n}{m}(α^{−3})^{m}}

= \frac{∑_{m=0}^{k}(\binom{n}{m} + \binom{n}{m−1})(α^{−3})^{m}}{∑_{m=0}^{k} \binom{n}{m}(α^{−3})^{m}}

= 1 + \frac{∑_{m=0}^{k} \binom{n}{m−1}(α^{−3})^{m}}{∑_{m=0}^{k} \binom{n}{m}(α^{−3})^{m}}

= 1 + α^{−3} \frac{∑_{m=0}^{k} \binom{n}{m−1}(α^{−3})^{m−1}}{∑_{m=0}^{k} \binom{n}{m}(α^{−3})^{m}}

= 1 + α^{−3} \frac{∑_{m=0}^{k−1} \binom{n}{m}(α^{−3})^{m}}{∑_{m=0}^{k} \binom{n}{m}(α^{−3})^{m}}

= 1 + α^{−3} (1 − \frac{\binom{n}{k}(α^{−3})^{k}}{∑_{m=0}^{k} \binom{n}{m}(α^{−3})^{m}} ) .

In the last fraction, the numerator tends to zero (same proof as before, with Stirling’s formula) and the denominator is lower-bounded by 1, so the fraction tends to zero as n goes to infinity.

If ⌊(n + 1)/3⌋ = ⌊n/3⌋ + 1 = k + 2, then we simply have to add to the numerator of the first fraction the expression \binom{n+1}{k+1}(α^{−3})^{k+1}, which again tends to zero as n goes to infinity, and can be neglected for that reason.

Thus, we have proved that the sequence (Z_{n})_{n} grows exponentially to infinity with a growth rate equal to α(1 + α^{−3}); so does the sequence (S(τ_{n}))_{n}, since the term c_{n} · 2^{n} can be neglected. Using the relation α^{3} = 2α^{2} + 1, we get that α(1 + α^{−3}) = 2(α − 1). It remains then to divide this value by 2, which gives α − 1, to obtain the growth rate of the average value of the n-th term of a random Fibonacci sequence such that its first term is 1 and its second is φ or φ^{−1}.

3.4 Step 4: growth rate of S(τ_{n}^{(a,b)}) for all pairs (a, b)

For any pair (a, b) such that a ≥ 0, b ≥ 0 and ab ≠ 0, there exist two numbers u and v such that uv ≠ 0 and such that (a, b) = u(1, φ) + v(1, φ^{−1}). Thus, we have

S(τ_{n}^{(a,b)}) = uS(τ_{n}^{(1,φ)}) + vS(τ_{n}^{(1,φ^{−1})}).

Since the sequences (S(τ_{n}^{(1,φ)}))_{n} and (S(τ_{n}^{(1,φ^{−1})}))_{n} both increase exponentially with 2(α− 1) as growth rate, this is still the case for the sequence (S(τ_{n}^{(a,b)}))_{n}. Dividing by 2 the value 2(α − 1) to get the average value of the n-th term, we obtain the result stated in Theorem 1.

4 Interesting properties of R and related trees

This section is devoted to some properties of R which seem of interest to us. It concerns the arithmetical properties of the nodes of the tree, some facts about continued fraction expansion, some combinatorial properties, and also, for an important part, the link between the tree and the sets SL(2, ℕ) and SL(2, ℤ).

4.1 Values in the n-th row of R

Lemma 1 allows to know explicitly the numbers of 1s in any row. Our aim is here to extend this result to the other numbers.

Let us recall that the Euler function ϕ maps each positive integer n to the number, denoted by ϕ(n), of positive integers k < n such that k and n are relatively prime. (We fix the convention ϕ(1) = 1.)

Lemma 13. Let n ≥ 1 be an integer. The nodes in R with value n are included in a union of 2ϕ(n) walks in R.

Proof. The case n = 1 is contained in Lemma 1, thus we assume n ≥ 2. Let k < n be a positive integer prime with n. By Proposition 1, the pairs (n, k) and (k, n) appear only once.

We start from the pair (n, k). The walk defined by the sequence of signs + − + + − + + − + + − + +… shows successively the integers:

n + k n 2n + k 3n + k n 4n + k 5n + k n 6n + k 7n + k n …

so this walk shows all pairs of the form (n, 2mn + k) and of the form ((2m + 1)n + k, n), where m is any integer, and shows no other pair containing n.

In the same way, starting from (k, n) and applying the sequence of signs − + − + + − + + − + + − +… (it is allowed to start with a − sign since, thanks to Lemma 6, n is necessarily a right child of k), we get the sequence of integers:

n − k 2n − k n 3n − k 4n − k n 5n − k 6n − k n …,

so this walk shows all pairs of the form (n, 2mn + (n − k)) and of the form ((2m + 1)n + (n − k), n), where m is any integer, and shows no other pair containing n.

The union of all these walks then show all appearing pairs in R containing n, and their cardinality is twice the number of integers k < n primes with n, so the lemma is proved.

Lemma 14. Let n > 0 be an integer. There exists an integer N(n) such that, for any N ≥ N(n), there are exactly 2ϕ(n) nodes equal to n among the N-th, the (N + 1)-th and the (N + 2)-th row of R.

Lemma 15. For any positive integer N, the N-th row of R is included in the (N + 3)-th one, that is if the value v appears a times in the N-th row, then it appears at least a times in the (N + 3)-th one.

Both of the two previous lemmas are immediate consequences of the fact that each walk in Lemma 13 shows exactly two nodes between each value n.

Proposition 7. For all integers k and n, let us denote by a_{k,n} the number of nodes of value n in the k-th row of R. For all k ≥ 0, we define the formal series S_{k}(X) as ∑_{n>0} a_{k,n}X^{n}. The sequence (S_{k}(X) + S_{k+1}(X) + S_{k+2}(X))_{k} is increasing and admits as a limit the series

S(X) := 2 ∑_{n>0} ϕ(n)X^{n}.

Proof. The fact that the formal series is increasing is a consequence of Lemma 15. Lemma 14 shows that, for any integer n, a_{k,n} = 2ϕ(n) for all k ≥ N(n), so the proposition is proved.

Simple considerations of parity gives the following easy proposition, which allows to be a little more precise in the description of the rows of R:

Proposition 8. The values of the nodes in the N-th row of R are all even (resp. all odd) iff N belongs (resp. does not belong) to 2 + 3ℕ.

Proof. The property is true for the first rows of R. If the nodes of two consecutive rows are all odd, then, since the values of the nodes of the next row are all of the form |a ± b| where a and b are odd, all of theses values are even. In the same way, if all nodes of a row are even and all of the following (or previous) are odd, then the next row is made of odd values only, and Proposition 8 is proved.

4.2 Positions of 0-nodes in T

By 0-nodes of T we mean the nodes with value 0. The aim of this section is to determine their position in T in term of finite walks (w_{i})_{0≤i≤N}.

Definition 1. A finite walk (w_{i})_{0≤i≤N} such that the corresponding random Fibonacci sequence (g_{i})_{0≤i≤N+2} verifies that g_{i} = 0 only for i = N + 2 will be said a single-0 walk.

By Proposition 8, if (w_{i})_{0≤i≤N} is a single-0 walk, then N is of the form 3n, where n is an integer.

Lemma 16. Let (w_{i})_{0≤i≤N} be a single-0 walk such that N > 0. We have w_{N} = w_{N−1} = w_{N−2} = −.

Proof. By Proposition 1, g_{N} = 0 implies g_{N−1} = 1, and so g_{N−2} = 1. Since g_{N−3} ≠ 0 by hypothesis, we have g_{N−3} = 2. Finally, we get w_{N} = w_{N−1} = w_{N−2} = −.

Proposition 9. A finite walk (w_{i})_{0≤i≤N} is a single-0 walk iff the inequality

Card(\{0 ≤ j < i : w_{j} = +\}) ≥ \frac{i}{3}

holds for all i ≤ N but not for i = N + 1.

Proof. The proposition is true for N = 0. In the following, we assume that the statement is true for finite walks of at most 1 + 3(n − 1) elements, where n ≥ 1 is some integer.

Let us prove the implication. Consider a single-0 walk (w_{i})_{0≤i≤N} where N = 3n: since N > 0, we have w_{0} = +. By Lemma 16, the three last terms of the walk are minus signs, so there is at least one position in the walk where we find the succession + − −, which can be removed thanks to the considerations made in section 2.4. We then get a single-0 walk (w̃_{i})_{0≤i≤N−3} which, by induction hypothesis, verifies the cardinality property stated in the proposition. The re-introduction of the sequence + − − does not modify the validity of this cardinality property, so the walk (w_{i})_{0≤i≤N} verifies this cardinality property.

Conversely, let assume that a walk (w_{i})_{0≤i≤N} (with N = 3n) verifies the cardinality property. We thus have w_{N} = −, and there must be exactly n plus signs and 2n minus signs among the w_{i}s for i ∈ [0, 3n−1]. Consequently, the sequence +−− must appear somewhere. Suppress it: the cardinality property remains true for the new sequence, which is therefore a single-0 walk by the induction hypothesis. Re-introducing the + − − does not introduce one more 0 in the random Fibonacci sequence, so the full sequence (w_{i})_{0≤i≤N} is also a single-0 walk, and the proposition is proved.

Corollary 4. A single-0 walk (w_{i})_{0≤i≤3n} contains n plus signs and 2n + 1 minus signs.

The property mentioned in the previous proposition has for consequence the following (see the sequence \underline{A001764} in [7] for details and references):

Proposition 10. Let us denote by ω_{n} the number of single-0 walks (w_{i})_{0≤i≤3n}. We have

ω_{n} = \frac{1}{2n + 1}\binom{3n}{n}.

We can deduce from what precedes the following description of walks (w_{i})_{0≤i≤N} such that w_{N} = 0 (without necessarily w_{i} ≠ 0 for i < N). Let us give it briefly: we denote by z_{1}, z_{2}, z_{3}… the increasing values between 0 and N such that g_{z_{1}+2} = g_{z_{2}+2} = g_{z_{3}+2} = ⋯ = 0. Then, the walks defined by (w_{i})_{0≤i≤z_{1}}, (w_{i})_{z_{1}+3≤i≤z_{2}}, (w_{i})_{z_{2}+3≤i≤z_{3}}, … are single-0 walks (and, thus can be described with the use of Proposition 9), and the elements w_{z_{1}+1}, w_{z_{1}+2}, w_{z_{2}+1}, w_{z_{2}+2}, w_{z_{3}+1}, w_{z_{3}+2}… are allowed to be plus or minus signs without condition.

4.3 The matrix point of view

Let us keep the nodes and edges of R and the rules for the values at each node, but let us replace the first appearing pair (1, 1) by formal expressions a and b, to get the following tree:

ab a + b a  a + 2b 2a + b  b  2a + 3b a + b  3a + b  a + 3b  a + b  3a + 5b 3a + 2b  a  5a + 2b  a + 2b a + 4b  3a + 4b  a + 2b 5a + 8b^{2a + b} ^{4a + 3b} ^{4a + b} ^{2a + b} ^{8a + 3b} ^{2a + 5b} ^{b} ^{2a + 7b} ^{2a + 3b} ^{4a + 5b} ^{4a + 7b} ^{2a + 3b}^{8a + 13b}

Figure 4: The general restricted tree R_{(a,b)}

It is easily seen that, for any nonegative a and b, all the recurrence relations given previously concerning sum of rows remain true, up to a change in initial values of those sequences.

Lemma 2 leaves to the following interpretation of this tree in terms of elements of SL(2, ℕ): the nodes of the general restricted tree are all of the form ma + nb. We deduce from this tree another tree in which the edge joining the nodes ma + nb and m′a + n′b is labelled by

the matrix ( \begin{matrix}m & n \\ m′ & n′ \end{matrix} ), which belongs to SL(2, ℤ) by Lemma 2.

( \begin{matrix}1 & 0 \\ 0 & 1 \end{matrix} )^{( \begin{matrix}0 & 1 \\ 1 & 1 \end{matrix} )}^{( \begin{matrix}1 & 1 \\ 1 & 0 \end{matrix} )}  ^{( \begin{matrix}1 & 1 \\ 1 & 2 \end{matrix} )}^{( \begin{matrix}1 & 0 \\ 2 & 1 \end{matrix} )}  ^{( \begin{matrix}1 & 2 \\ 0 & 1 \end{matrix} )} ^{( \begin{matrix}1 & 2 \\ 2 & 3 \end{matrix} )}^{( \begin{matrix}2 & 1 \\ 1 & 1 \end{matrix} )}^{( \begin{matrix}2 & 1 \\ 3 & 1 \end{matrix} )}  ^{( \begin{matrix}0 & 1 \\ 1 & 3 \end{matrix} )}  ^{( \begin{matrix}2 & 3 \\ 1 & 1 \end{matrix} )}^{( \begin{matrix}2 & 3 \\ 3 & 5 \end{matrix} )}^{( \begin{matrix}1 & 1 \\ 3 & 2 \end{matrix} )}  ^{( \begin{matrix}3 & 1 \\ 1 & 0 \end{matrix} )}^{( \begin{matrix}3 & 1 \\ 5 & 2 \end{matrix} )}  ^{( \begin{matrix}1 & 3 \\ 1 & 2 \end{matrix} )}^{( \begin{matrix}1 & 3 \\ 1 & 4 \end{matrix} )}  ^{( \begin{matrix}1 & 1 \\ 3 & 4 \end{matrix} )}  ^{( \begin{matrix}3 & 5 \\ 1 & 2 \end{matrix} )}^{( \begin{matrix}3 & 5 \\ 5 & 8 \end{matrix} )}

Figure 5: The SL(2, ℕ) tree

Proposition 11. The latter tree is composed of all elements of SL(2, ℕ), each appearing exactly once.

Proof. The fact that the coefficients of all the matrices are nonnegative is a consequence of Lemma 2. The fact that each matrice cannot appear twice is a consequence of the non-

redundance property of R. Finally, if ( \begin{matrix}m & n \\ m′ & n′ \end{matrix} ) ∈ SL(2, ℕ), then the characterization

of walks in R (Corollary 2) suggests to consider the matrix ( \begin{matrix}|m − m′| & |n − n′| \\ m & n \end{matrix} ) as its

parent. Pursuing in the same way, by induction we construct an effective walk in the tree which leads to the desired matrix, and the proposition is proved.

Proposition 12. If M ∈ SL(2, ℕ) is attained by the walk (w_{i})_{0≤i≤n} in the tree, then M^{T} is attained by the walk (w_{n−i})_{0≤i≤n}. (In particular, M and M^{T} appears at the same row in the SL(2, ℕ) tree).

Proof. Let us denote by M := ( \begin{matrix}m & n \\ m′ & n′ \end{matrix} ) the label of an edge. The right child of M is the

matrix DM, where D = ( \begin{matrix}0 & 1 \\ 1 & 1 \end{matrix} ).

By Lemma 2, if m > m′ then n ≥ n′ and if n > n′ then m ≥ m′. In particular, if m > m′ then m + n > m′ + n′ and M has no left child (take a = b = 1 and use Lemma 6). For the same reason, if n > n′ then M has no left child. So if M has a left child, then m ≤ m′ and n ≤ n′ and, since we cannot have m = m′ and n = n′ (because of the relation mn′ − m′n = ±1), Lemma 6 shows that this is a sufficient condition. A simple calculation

shows that, in this case, the left child of M is given by GM, where G = ( \begin{matrix}0 & 1 \\ −1 & 1 \end{matrix} ).

Any matrix M of the SL(2, ℕ) tree can therefore be written as a product of the form

G^{γ_{0}}D^{δ_{0}}GD^{δ_{1}} ⋯ GD^{δ_{k−1}}GD^{δ_{k}} · ( \begin{matrix}0 & 1 \\ 1 & 1 \end{matrix} ), where γ_{0} = 0 or 1, δ_{i} > 0 for all i between 0 and

k − 1 and δ_{k} ≥ 0. The matrix ( \begin{matrix}0 & 1 \\ 1 & 1 \end{matrix} ) corresponds to the child of the identity matrix in

the SL(2, ℕ) tree and is simply equal to D.

We remark that D^{T} = D and that, as a simple computation shows, G^{T} = D^{−1}GD, so we get

M^{T} = (G^{γ_{0}}D^{δ_{0}}GD^{δ_{1}} ⋯ GD^{δ_{k−1}}GD^{δ_{k}} · D)^{T}
= D · D^{δ_{k}}^{t}GD^{δ_{k−1}}^{t}G ⋯ D^{δ_{1}}^{t}GD^{δ_{0}}^{t}G^{γ_{0}}
= D^{δ_{k}+1}(D^{−1}GD)D^{δ_{k−1}}(D^{−1}GD) ⋯ D^{δ_{1}}(D^{−1}GD)D^{δ_{0}}(D^{−1}GD)^{γ_{0}}
= D^{δ_{k}}GD^{δ_{k−1}}G ⋯ D^{δ_{1}}GD^{1+δ_{0}−γ_{0}}G^{γ_{0}}D^{γ_{0}}.

It is then routinely verified that, in the case γ_{0} = 0 as well as in the case γ_{0} = 1, this latter expression is equal to D^{δ_{k}}GD^{δ_{k−1}}G ⋯ D^{δ_{1}}GD^{δ_{0}}G^{γ_{0}} · D, and the proposition is proved.

The following tree is deduced from the previous one, each matrix being replaced by the sign of its determinant.

+ - -  + +  +  - +  -  -  -  + -  - +  - +  +  + - - +  +  + -  +  + -  + -  -  - + + + -  + -  -  - +  + -  -  - +  -  - +  - + + + -

Figure 6: The determinants tree

The structure of the plus and minus signs is given by the following rules, routinely proved: Proposition 13. Let ε ∈ {−, +} be the label of an edge. The right edge following it is labelled −ε and the left one (if it exists) by ε.

As a corollary, we get the number of + and − in each row of the tree: Corollary 5. The number of plus signs at the n-th row is F_{n}/2 if n is of the form 3k, ⌊F_{n}/2⌋ + 1 if n is of the form 3k + 1, and ⌊F_{n}/2⌋ if n is of the form 3k + 2. Proof. Let us consider the n-th row of the tree; we denote by d_{n}^{+} (resp. d_{n}^{−}) its number of right edges labelled + (resp. −) and by g_{n}^{+} (resp. g_{n}^{−}) the number of left edges labelled + (resp. −). Proposition 4 easily gives the following relations for all n:

d_{n}^{+} + d_{n}^{−} = F_{n−1} and g_{n}^{+} + g_{n}^{−} = F_{n−2}.

The structure of the tree, together with Proposition 13, also give the following:

d_{n+1}^{+} = g_{n}^{−} + d_{n}^{−} d_{n+1}^{−} = g_{n}^{+} + d_{n}^{+},

g_{n+1}^{+} = d_{n}^{+} g_{n+1}^{−} = d_{n}^{−}.

We deduce from those relations that d_{n+1}^{+} + g_{n+1}^{+} = F_{n−1} + g_{n}^{−} and that d_{n+1}^{−} + g_{n+1}^{−} = F_{n−1} + g_{n}^{+}. If we denote by e_{n} the difference g_{n}^{+} − g_{n}^{−}, then we get

e_{n} = g_{n}^{+} − g_{n}^{−} = d_{n−1}^{+} − d_{n−1}^{−}
= (g_{n−2}^{−} + d_{n−2}^{−}) − (g_{n−2}^{+} + d_{n−2}^{+})
= −e_{n−2} − (d_{n−2}^{+} − d_{n−2}^{−})
= −e_{n−2} − (g_{n−1}^{+} − g_{n−1}^{−})
= −(e_{n−2} + e_{n−1}).

Since an immediate computation shows that e_{3} = −1 and e_{4} = 0, we easily get that the sequence (e_{n})_{n≥3} is simply the sequence −1, 0, 1, −1, 0, 1, etc., and the conclusion follows.

An immediate consequence of the rules given in Proposition 13 is that the infinite words in {−, +} given by walks in the determinant tree are exactly those which never show the sequence − − − neither + + +. In particular:

Proposition 14. In {−, +}^{ℕ} equipped with the cylinder topology, let us denote by D the subset of words who does not show anywhere the succession − − − or + + +, and by W the subset of all words which never show the succession −−. To any w ∈ W we associate its corresponding walk in R, then make the codage d ∈ D corresponding to the determinants of the edges of R. Thus, the defined function ϕ : W ⟶ D is bijective. Moreover, the n first letters of ϕ(w) depends only on the n first letters of w, and conversely the n first letters of d depends only on those of ϕ^{−1}(d). In particular, ϕ is bicontinuous.

Finally, the next tree is obtained by replacing each matrix by its trace.

21 1  3 2  2  4 3  3  3  3  7 3  3 5  3 5  5  5 11 4 6  2  6 8  6  2 8  6 8  8  8 18^{5}  ^{5} ^{9}  ^{5} ^{5}  ^{5}  ^{9} ^{13}  ^{5} ^{9}  ^{5}  ^{5} ^{13}  ^{9}  ^{5} ^{13}  ^{9} ^{13}  ^{13} ^{13} ^{29}

Figure 7: The traces tree

If we denote by H_{n} the sum of the values of the n-th row of this latter tree, we have the following result:

Proposition 15. We have H_{1} = 2, H_{2} = 1, H_{3} = 4 and, for any n ≥ 3, H_{n} = 2H_{n−1} + H_{n−3} − (−1)^{n} · 2.

Proof. We first prove the following statement.

Proposition 16. With the same notation as in the proof of Proposition 5, we have

G_{3}^{−} = G_{4}^{−} = 1 G_{n}^{−} = 2G_{n−1}^{−} + G_{n−3}^{−} + (−1)^{n} · 2 (for n ≥ 5),
G_{3}^{+} = 3 G_{4}^{+} = 8 G_{n}^{+} = 2G_{n−1}^{+} + G_{n−3}^{+} − (−1)^{n} · 2 (for n ≥ 5).

Proof. The above relations are routinely verified for the first values of n. Let assume that these relations are true for all indices until n − 1. Recalling the relation G_{n}^{−} = G_{n−1}^{+} − G_{n−2} (see the proof of Proposition 5) we get

G_{n}^{−} = G_{n−1}^{+} − G_{n−2}
= (2G_{n−2}^{+} + G_{n−4}^{+} − (−1)^{n−1} · 2) − (G_{n−2}^{+} + G_{n−2}^{−})
= G_{n−2}^{+} − G_{n−2}^{−} + G_{n−4}^{+} + (−1)^{n} · 2.

We thus have to verify the relation G_{n−2}^{+} − G_{n−2}^{−} + G_{n−4}^{+} = 2G_{n−1}^{−} + G_{n−3}^{−}. We write, using again the relation G_{n}^{−} = G_{n−1}^{+} − G_{n−2}:

2G_{n−1}^{−} + G_{n−3}^{−} = 2(G_{n−2}^{+} − G_{n−3}) + (G_{n−4}^{+} − G_{n−5})
= (G_{n−2}^{+} − G_{n−2}^{−} + G_{n−4}^{+}) + (G_{n−2}^{+} + G_{n−2}^{−} − 2G_{n−3} − G_{n−5})
= (G_{n−2}^{+} − G_{n−2}^{−} + G_{n−4}^{+}) + (G_{n−2} − G_{n−2}),

so the desired relation for G_{n}^{−} is verified.

We can then write

G_{n}^{+} = G_{n} − G_{n}^{−}
= G_{n} − (2G_{n−1}^{−} + G_{n−3}^{−} + (−1)^{n} · 2)
= G_{n} − 2G_{n−1}^{−} − G_{n−3}^{−} − (−1)^{n} · 2
= G_{n} − 2G_{n−1} + 2G_{n−1}^{+} − G_{n−3}^{−} − (−1)^{n} · 2
= G_{n−3} + 2G_{n−1}^{+} − G_{n−3}^{−} − (−1)^{n} · 2
= 2G_{n−1}^{+} + G_{n−3}^{+} − (−1)^{n} · 2,

so Proposition 16 is proved.

We now come back to the proof of Proposition 15. Recall (see comments after Proposition 5) that if we write v_{n} = α_{n}a + β_{n}b for the sum of the n-th row of the general restricted tree, then we have

α_{0} = 1 α_{1} = 0 α_{2} = 1 α_{3} = 2 α_{n} = 2α_{n−1} + α_{n−3} for n ≥ 4,
β_{0} = 0 β_{1} = 1 β_{2} = 1 β_{3} = 2 β_{n} = 2β_{n−1} + β_{n−3} for n ≥ 3.

It is clear that β_{n} corresponds to the sum of all fourth coefficients of the matrices of the n-th row. The sum α_{n−1} is not exactly the sum of the first coefficients of these matrices, since some a-coefficients in the (n − 1)-th row have to be counted twice. We can consider α_{n−1} as the sum of the first coefficients of all matrices which are right children. It remains, then, to evaluate the sum of a-coefficients of elements of the (n − 1)-th row which are left children. For this, let us consider the particular case a = 1 and b = 0 in the general restricted tree. Let us denote by α_{n}^{−} the sum of left children in the n-th row of this tree: we then have H_{n} = α_{n−1}+α_{n−1}^{−}+β_{n}. We know by Proposition 16 and by the fact mentioned in the begining of the present section that, for all n ≥ 3, we have α_{n−1}^{−} = 2α_{n−2}^{−} + α_{n−4}^{−} + (−1)^{n−1} · 2. We thus obtain the right recurrence relation for the sequence (H_{n})_{n}, and a simple calculation gives the first values of this sequence.

The following shows that the structure of the trace tree is more difficult to apprehend than these of the other trees considered here.

Lemma 17. Let us denote by t_{n} the label of the n-th edge given by a walk (w_{n})_{n} in the trace tree.

• If w_{n} = w_{n+1} (thus a + sign, by Lemma 5), then t_{n+2} = t_{n+1} + t_{n}.

• If w_{n} = w_{n+2} and w_{n+1} = w_{n+3} (then w_{n} = −w_{n+1}, again by Lemma 5), then t_{n+4} = t_{n+2} + t_{n}.

Proof. Immediate.

Lemma 18. The walks

+ − \overbrace{+ ⋯ +}^{k} − and − + \overbrace{+ ⋯ +}^{k} −

show the same sequence of labels in the trace tree, except for the first and the last ones.

Proof. A simple calculation together with Lemma 17 show that the walk + − \overbrace{+ ⋯ +}^{k} shows

the successive traces 3, 2, 3, 5,…, F_{k+3} and that the walk − + \overbrace{+ ⋯ +}^{k} shows the traces 1, 2, 3, 5,…, F_{k}, so the sequence of traces are the same for the two walks, except for the first one.

To prove that the last traces shown by the walks considered in the statement of the Lemma are different, we need to be a little more precise. A simple calculation shows that

the last element of SL(2, ℕ) associated with + − \overbrace{+ ⋯ +}^{k} is ( \begin{matrix}F_{k−1} & L_{k} \\ F_{k} & L_{k+1} \end{matrix} ), where (L_{n})_{n} is

the Lucas sequence, defined as L_{1} = 1, L_{2} = 3 and L_{n} = L_{n−1} + L_{n−2} for n ≥ 2. In the same

way, the last element of SL(2, ℕ) associated with the walk − + \overbrace{+ ⋯ +}^{k} is ( \begin{matrix}F_{k+2} & F_{k} \\ F_{k+3} & F_{k+1} \end{matrix} )

(an easy recurrence shows that, for all k, F_{k−1} + L_{k+1} = F_{k+2} + F_{k+1}, which confirms what precedes about equality of traces). Adding the minus sign to each of the two walks leaves

to the matrix ( \begin{matrix}F_{k} & L_{k+1} \\ F_{k−2} & L_{k−1} \end{matrix} ) for the first walk and ( \begin{matrix}F_{k+3} & F_{k+1} \\ F_{k+1} & F_{k−1} \end{matrix} ) for the second. The

traces are F_{k} + L_{k−1} and F_{k−1} + F_{k+3}, which are different numbers for any k.

Corollary 6. The previous function (w_{n})_{n} ⟶ (t_{n})_{n} is not of finite type.

4.4 Size of walks in R

Notation 4. For a and b relatively prime, we denote by ρ(a, b) the smallest integer n such that the n-th row of edges in T contains an edge with a as parent and b as child. As established in Proposition 3 and Proposition 1, this shortest walk shows the pairs (r_{i}, r_{i+1}) or (r_{i+1}, r_{i}) for all i (same notation as in the proof of Proposition 1). The relatively prime integers a and b being given, any pair of the form (r_{i}, r_{i+1}) (resp. (r_{i+1}, r_{i})) is said in ascending (resp. descending) order. When after (r_{i}, r_{i+1}) comes (r_{i}, r_{i−1}), or after (r_{i+1}, r_{i}) comes (r_{i−1}, r_{i}), we say that there is an inversion.

If [n_{0}, n_{1}, …, n_{N−1}] is the continued fraction expansion of a/b, then let define γ(a, b) as the total number of even and positive partial quotients n_{i} with i < N − 1 (note that the last partial quotient, n_{N−1}, does not count, neither n_{0} in the case a < b) and by ω(a, b) the total number of odd partial quotients n_{i} with i < N − 1. We denote by ω^{−}(a, b) (resp. ω^{+}(a, b)) the number of odd partial quotients n_{i} with i < N − 1 such that the number of even partial quotients among n_{i+1}, n_{i+2},…, n_{N−2} is odd (resp. even).

Proposition 17. Let [n_{0}, …, n_{N−1}] be the continued fraction expansion of a/b, where a and b are relatively prime integers. Then, we have

ρ(a, b) = 3 · (∑_{i<N}⌊\frac{n_{i}}{2} ⌋) + ω(a, b) + ω^{±}(a, b) − ε,

where

• if a < b:

ω^{±}(a, b) = \{ \begin{matrix}ω^{+}, & if γ is odd; \\ ω^{−}, & if γ is even. \end{matrix} and ε = \{ \begin{matrix}0, & if n_{N−1} is odd; \\ 1, & if n_{N−1} is even and γ odd; \\ 2, & if n_{N−1} is even and γ even. \end{matrix}

• if a > b:

ω^{±}(a, b) = \{ \begin{matrix}ω^{−}, & if γ is odd; \\ ω^{+}, & if γ is even. \end{matrix} and ε = \{ \begin{matrix}0, & if n_{N−1} is odd; \\ 2, & if n_{N−1} is even and γ odd; \\ 1, & if n_{N−1} is even and γ even. \end{matrix}

Note that we do not know if there exists a significantly more elegant way of writing the value of ρ(a, b).

Proof. We use the construction made in the proof of Lemma 1 and Proposition 1.

By a simple application of Lemma 1, the number of steps to go from the edge (1, 1) to the edge (1, n_{N−1}) is 3 · ⌊n_{N−1}/2⌋ if n_{N−1} is odd and 3 · ⌊n_{N−1}/2⌋ − 2 if n_{N−1} is even. In the same way, it takes 3 · ⌊n_{N−1}/2⌋ steps to go from (1, 1) to (n_{N−1}, 1) if n_{N−1} is odd and 3 · ⌊n_{N−1}/2⌋ − 1 if n_{N−1} is even.

From (1, n_{N−1}) (or (n_{N−1}, 1)) to (a, b), the number of inversions is equal to γ(a, b). For clarity, let assume a < b: if γ(a, b) is even, we thus have to attain (1, n_{N−1}) first, and it takes 3⌊n_{N−1}/2⌋ − ε steps (ε being defined as in the statement of the present Proposition); if γ is odd, we have to attain (n_{N−1}, 1), which again take 3⌊n_{N−1}/2⌋ − ε steps (but maybe with a different value for ε).

The summary at the end of Proposition 1 shows that, for all successive partial quotients after n_{N−1}, the number of steps for a n_{i} is given by 3⌊n_{i}/2⌋ when n_{i} even, 3⌊n_{i}/2⌋ + 1 when n_{i} odd and when we start at (r_{i+2}, r_{i+1}), and 3⌊n_{i}/2⌋ + 2 when n_{i} odd and when we start at (r_{i+1}, r_{i+2}).

The sum of all these terms is equal to the sum 3 ∑_{i<N}⌊n_{i}/2⌋ − ε, plus the number of odd n_{i}s for i < N − 1 (which corresponds to ω(a, b)), plus the number of n_{i}s for i < N − 1 such that the steps start at (r_{i+1}, r_{i+2}), this latter number being equal to ω^{±}(a, b) (recall that there is an inversion only for even partial quotients).

The case a > b works in the same way.

Corollary 7. For any a and b relatively prime, we have

|ρ(a, b) − ρ(b, a)| = |ω^{+}(a, b) − ω^{−}(a, b)| ± ε̃

where |ε̃| ≤ 1.

Proof. Immediate.

Corollary 8. With the previous notation, we have the equality

ρ(a, b) + ρ(b, a) = 3 (∑_{i<N} n_{i}) − 3.

Proof. Denoting by e the value 1 if n_{N−1} is odd and 0 if n_{N−1} is even, we have

ρ(a, b) + ρ(b, a) = 3 (∑_{i<N} 2⌊\frac{n_{i}}{2} ⌋) + ω(a, b) + ω(b, a) + ω^{±}(a, b) + ω^{∓}(a, b) − ε(a, b) − ε(b, a)

= 3 (∑_{i<N} \frac{n_{i}}{2} − ω(a, b) − e) + 3ω(a, b) − ε(a, b) − ε(b, a)

= 3 (∑_{i<N} n_{i}) − 3,

and the Corollary is proved.

5 Some perspectives

Here are some natural questions we can ask to go further in the subject. Hopefully, we will be able to answer soon at least to the two first following questions, for which it is quite probable that the present paper already contains all the necessarily tools.

• How about replacing (1/2, 1/2)^{⊗ℕ} by (p, 1 − p)^{⊗ℕ} ?

That is, each choice for the sign in the expression g_{n} = |g_{n−1} ±g_{n−2}| is made by tossing an unbalanced coin. More generally, let P defines a probability measure on {+, −}^{ℕ}: is it possible to give a reasonable and interesting assumption on P which allows to describe the average behaviour of random Fibonacci sequences given by the law P?

Hopefully, the formalism introduce in the present paper may allow to give an answer at least under an assumption of stationnarity and type-finitness.

• Generalized random Fibonacci sequences

Instead of considering the recurrence formula g_{n} = |g_{n−1} ± g_{n−2}|, we can consider the more general formula g_{n} = |αg_{n−1} ± βg_{n−2}|, where α and β are real numbers. It is probable that a result similar to Theorem 1 could be obtained by using the tools introduced in the previous section. With the use of the convexity inequality 𝔼(g_{n}^{1/n}) ≤ (𝔼(g_{n}))^{1/n} (where 𝔼 stands for the expectation), such a result could give a lower bound to the value β such that, when α = 1, almost all random Fibonacci sequences do not increase exponentially (no nontrivial lower bound is known at now; the best currently known upper bound for β is 1/\sqrt{2} - see [5]).

The continued fraction expansion point of view considered in the first part of the present paper may also extend to this new case, considering another kind of continued fractions expansions, probably looking like

αn_{0} + \frac{β}{αn_{1} + _{\frac{β}{αn_{2}+ \frac{β}{αn_{3}+···}}}} ,

where the n_{i}s are integers.

Of course, one could also be interested in more general linear recurring sequences, as g_{n} = |αg_{n−1} ± βg_{n−2} ± γg_{n−3}|, and so forth.

• Limits of walks in R and continued fraction expansion

Let us consider the number 1 + \sqrt{2}, whose continued fraction expansion is [2, 2, 2, …]. Its convergents are [2], [2, 2], [2, 2, 2], etc. Since the continued fraction expansion of each convergent is a suffix of the continued fraction expansion of the next convergent, the corresponding walks in the tree R are included one into the other. It is then possible to talk about a pair of infinite walks corresponding to 1 + \sqrt{2} (the union of the two walks giving the set of all pairs of the form (p_{n}, q_{n}) and (q_{n}, p_{n}), where p_{n}/q_{n} are the convergents to 1 + \sqrt{2}). Let us consider now the number \sqrt{2} = [1, 2, 2, 2, …]. Its convergents are [1], [1, 2], [1, 2, 2], etc., so the suffix property is not true anymore. It remains that the finite walks in R given by these convergents are linked together. Indeed, it is easily proved that, apart for a final “branch” which is identical for all convergents, the pair of walks are the same as those for the convergents of 1 + \sqrt{2}. Thus, it seems that there is also something like a limit of the pair of walks for the convergents of \sqrt{2}. An interesting fact is that this limit may be equal to the limit walks for 1 + \sqrt{2}, that is, this point of view identifies equivalent numbers (in the sens of continued fractions, two numbers are equivalents iff they have the same partial quotients apart for the first ones).

These considerations extends to any quadratic number, that is, thanks to Lagrange’s theorem, numbers whose continued fraction expansion is periodic (we get n pairs of infinite walks for a number whose partial quotients are perioodic with period n). Is it possible to get an interesting generalization of this, at least for some numbers (for example: numbers with bounded partial quotients)?

• With the roots of unity

Another possible generalization of random Fibonacci sequences is to choose an integer p ≥ 2 and define a random Fibonacci sequence by g_{n} = g_{n−1} + (e^{2iπ/p})^{Z(ω)} · g_{n−2} (or g_{n} = |g_{n−1} + (e^{2iπ/p})^{Z(ω)} · g_{n−2}|, or other formulas of the same kind), where Z is a random variable taking values in {0, … p − 1}. We then get p-ary trees instead of binary trees. Are there interesting facts to say about these sequences?

We finish with a heuristic link between the trees R and T (a rigorous proof of it will be made in a forthcoming paper). Let us denote by τ the growth rate of almost all random Fibonacci sequence (we know, thanks to Viswanath [6], that τ ≈ 1.13198824), and by ρ the corresponding constant for walks in R instead of T (we do not prove here that such a ρ exists).

Let us write, in a very crude manner, a typical random Fibonacci sequence as g_{n} = τ^{n} for all n. We denote by γ_{n} the node in R corresponding to the node g_{n} in T by projection, and by λ(n) the rank of the row of R to which γ_{n} belongs. The supposed existence of ρ implies that, again in a heuristic way, τ^{n} = ρ^{λ(n)}.

At the time n, the probability that the projection will have to get back two rows before in R is given by the ratio between the number of “lacking” left children in ρ_{n} and the total number of children of ρ_{n} in the complete binary tree. This ratio is equal to F_{n−2}/2F_{n},which is asymptotically equal to 1/2φ^{2}. Therefore, we have (again in a heuristic way):

λ(n + 1) = (1 − \frac{1}{2φ^{2}} ) · (λ(n) + 1) + \frac{1}{2φ^{2}} · (λ(n) − 2).

Simplifying the latter equality gives λ(n + 1) = λ(n) + 1 − 3/2φ^{2}, so

λ(n) = (1 − \frac{3}{2φ^{2}} ) · n.

Putting this in the relation τ^{n} = ρ^{λ(n)} then gives

τ = ρ^{1−3/2φ^{2}}.

In particular, the knowledge of an analytic expression of τ could be derived from the knowledge of an analytic expression of ρ. Moreover, thanks to classical theorem of Gelfond-Schneider, the previous equality implies that ρ and τ cannot be both algebraic irrational numbers.

6 Acknowledgments

The author is grateful to Thierry de la Rue, Florent Hivert and Élise Janvresse from Université de Rouen, and Anne Broise and Thierry Bousch from Université Paris-Sud, for fruitful discussions.

References

[1] J.-P. Allouche, K. Scheicher and R. Tichy, Regular maps in generalized number systems, Math. Slovaca 50 (2000), 41–58.

[2] J.-P. Allouche and J. Shallit, The ring of k-regular sequences, Theor. Comput. Sci. 98 (1992), 163–197.

[3] J.-P. Allouche and J. Shallit, The ring of k-regular sequences, II Theor. Comput. Sci. 307 (2003), 3–29.

[4] É. Janvresse, B. Rittaud and T. de la Rue, How fast do random Fibonacci sequences

    grow?, http://fr.arxiv.org/abs/math.PR/0611860

[5] J. McGowan and E. Makover, An elementary proof that random Fibonacci sequences grow exponentially, J. Number Theory 121 (2006), 40–44.

[6] D. Viswanath, Random Fibonacci sequences and the number 1.13198824…, Math. Comp. 69 (2000), 1131–1155.

[7] The On-Line Encyclopedia of Integer Sequences,

    http://www.research.att.com/∼njas/

2000 Mathematics Subject Classification: Primary 11A55; Secondary 15A52, 05C05, 15A35. Keywords: binary tree, random Fibonacci tree, linear recurring sequence, random Fibonacci sequence, continued fraction.

(Concerned with sequence \underline{A000032}, \underline{A000045}, \underline{A001764}, \underline{A008998}, and \underline{A083404}.)

Received April 21 2006; revised version received January 18 2007. Published in Journal of Integer Sequences, January 19 2007.

Return to Journal of Integer Sequences home page.