{'fraction_non_alphanumeric': 0.0594925634295713, 'fraction_numerical': 0.019997500312460944, 'mean_word_length': 3.7346153846153847, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 17, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Accelerations of generalized Fibonacci sequences

In this paper we study how to accelerate the convergence of the ratios (x_n) of generalized Fibonacci sequences. In particular, we provide recurrent formulas in order to generate subsequences (x_{g_n}) for every linear recurrent sequence (g_n) of order 2. Using these formulas we prove that some approximation methods, as secant, Newton, Halley and Householder methods, can generate subsequences of (x_n). Moreover, interesting properties on Fibonacci numbers arise as an application. Finally, we apply all the results to the convergents of a particular continued fraction which represents quadratic irrationalities.


Introduction
The problem of finding sequences of approximations for a solution of a certain equation f (t) = 0 is really intriguing. There are various and famous methods to generate such sequences in literature, as Newton, secant and Halley methods. But another interesting problem is how to increase the rate of convergence for the different methods. One of the answer consists in selecting some subsequences of the starting approximations sequences which accelerate the convergence process. In the particular case when f (t) corresponds to a second degree polynomial, we may think about it as a characteristic polynomial of a generalized Fibonacci sequence. The ratio of its consecutive terms generates a new sequence which converges to the root of larger modulus of f (t), when it exists and it is real. Many authors have given methods to accelerate the rate of convergence of this sequence. McCabe and Phillips [5] have studied how some methods of approximations, like Newton and secant methods, provide an acceleration of such sequence for suitable initial values. Gill and Miller [2] have found similar results for the Newton method, only for the ratios of consecutive Fibonacci numbers. Many other works have been developed about this argument. In [4] and [6], e.g., the results of McCabe and Phillips [5] have been generalized for ratios of non-consecutive elements of generalized Fibonacci sequences. In [7] these results have been extended to other approximation methods, like the Halley method. The aim of this paper is to give new interesting points of view to prove in an easier way some known results about accelerations of generalized Fibonacci sequences, providing recurrent formulas in order to generate these subsequences. The accelerations related to approximation methods become particular cases of our work. In the first section we will expose our approach, showing in the second section the relationship with known approximation methods as Newton, secant, Halley and Householder methods. Moreover our results, in addition to a straightforward proof of some identities about Fibonacci numbers, can be applied to convergents of a particular continued fraction representing quadratic irrationalities. We will prove in the last section that particular subsequences of these convergents correspond to Newton, Halley and secant approximations for the root of larger modulus of a second degree polynomial, when it exists and it is real.
2. Accelerations of linear recurrent sequences of the second order Definition 2.1. We define, over an integral domain with unit R, the set S(R) of sequences a = (a n ) +∞ n=0 , and the set W(R) of linear recurrent sequences. Furthermore, we indicate with a = (a n ) +∞ n=0 = W(α, β, p, q) the linear recurrent sequence of order 2 with characteristic polynomial t 2 − pt + q and initial conditions α and β, i.e.,      a 0 = α a 1 = β a n = pa n−1 − qa n−2 ∀n ≥ 2 .
If we consider the sequence U = W(0, 1, p, q), it is well-known that the sequence converges to the root of larger modulus (when it is real and it exists) of the characteristic polynomial of U . Thus, every subsequence (x gn ) +∞ n=0 (for some sequence (g n ) +∞ n=0 ) can be considered as a convergence acceleration of the starting sequence x. Cerruti and Vaccarino [1] have deeply studied the applications of the companion matrix of linear recurrent sequences. Here we consider some of these results which are useful to find the explicit formulas for the acceleration of the sequences U and x. We define as the companion matrix of a linear recurrent sequence with characteristic polynomial t 2 − pt + q. We recall that some authors may use the transpose of M as the companion matrix.
Lemma 2.2. The sequences U = W(0, 1, p, q) and T = W(1, 0, p, q) satisfy the following relations where M is the companion matrix of U and T .
Proof. Using the Binet formula and initial conditions, we easily check that where α and β are the zeros of the characteristic polynomial t 2 − pt + q. Thus, remembering that αβ = q, we immediately obtain (2.2) . In order to prove (2.3), we observe that the characteristic polynomial of U and T annihilates M , i.e., we have So, using (2.2), we clearly find that the entries of M n in the first column are the terms T n , T n+1 of T , and in the second column are the terms U n , U n+1 of U .
Dealing with definition (2.1) of x, the ratio of two consecutive terms of any sequence a ∈ W(R) has a closed formula, as we show in the following Theorem 2.3. Let us consider any sequence a = W(a 0 , a 1 , p, q) and the sequence y = (y n ) +∞ n=2 , with y n = a n a n−1 , then y n = a n a n−1 = a 1 x n − a 0 q a 0 x n + a 1 − a 0 p ∀n ≥ 2 , where x n is the n-th term of the sequence x defined by (2.1).
Proof. By direct calculation we have y n = a n a n−1 = Proof. Let us consider a = W(U m , U m+1 , p, q), that is a n = U n+m for all n ≥ 0. So the sequence y, introduced in the previous theorem, becomes y = (y n = x n+m ) +∞ n=2 , and, from (2.4), we obtain The basis sequences U and T play a central role in the following results. The accelerations for such sequences yield explicit formulas for the acceleration of the convergent sequence x = (x n ) +∞ n=2 . Moreover, some interesting properties on Fibonacci numbers arise as an application. We recall without proof an important theorem about the generalized Fibonacci sequences.
Theorem 2.6. Given the sequences U = W(0, 1, p, q), T = W(1, 0, p, q), and x as defined in equation Moreover, if we choose x i and x j , for some i, j ≥ 2, as the initial steps of the acceleration of x, then We know as a consequence of Theorem 2.5 that we easily find the explicit expressions of U gn and T gn . Finally, to complete the proof, we only need to divide both U gn and T gn by the product T (s) g n−2 and consider their resulting ratio multiplied by −q , rearranging the terms we obtain the equality (2.6).
is the Fibonacci sequence, then for all n ≥ 5 Proof. The identities immediately follow from Theorem 2.6, observing that in this Remark 2.8. When U is the Fibonacci sequence F , the previous Corollary provides a direct proof of the interesting formula for all n ≥ 5, avoiding many algebraic manipulations based on the basic properties of Fibonacci numbers. This formula is also true for n = 3 and n = 4, as a little calculation can show.
The acceleration shown in the previous corollary is the same found by McCabe and Phillips in [5] with the secant method applied to the sequence (x n ) +∞ n=2 shifted by one step. If we consider we find U 2n = 2T n U n + pU 2 n , T 2n = T 2 n − qU 2 n , and (2.7) If we start from x 2 , a repeated use of equation (2.7) yields to the subsequence x 2 , x 4 , x 8 , ..., x 2 n , ..., corresponding to the subsequence obtained in [5], using the Newton method on the sequence (x n ) +∞ n=2 shifted by one step. Proposition 2.9. Using the notation of Theorem 2.6, for g = W(h, h + k, 2, 1), i.e., g n = kn + h ∀n ≥ 0, then for all n ≥ 2 U gn = 1 q g n−2 qU 2 g n−1 U g n−2 + 2T g n−1 U g n−1 T g n−2 + pU 2 g n−1 T g n−2 − U g n−2 T 2 Proof. We need to evaluate Considering that we have Finally, dividing both U gn and T gn by T 2 g n−1 T g n−2 , their ratio becomes from which, remembering that x gn = −q U gn T gn , with simple calculations we obtain the thesis.
Remark 2.10. Applying the last Proposition to the Fibonacci numbers, we get another example of a beautiful identity, easily proved without hard calculations. In fact, when we consider g n = kn, we have for all n ≥ 2 , which in particular , for k = 1, becomes

Approximation methods
In the previous section we have already seen how some accelerations are connected to some approximation methods, like Newton and secant methods. In this section, as particular cases of our work, we exactly retrieve the accelerations provided by these methods and studied in the papers [2] and [5]. Furthermore, using our approach, we can show similar results for different approximation methods, like the Halley method. Finally, we will examine the acceleration provided by Householder method, which is a generalization of Newton and Halley methods. First of all, we recall that the secant method, applied to the equation f (t) = 0, provides rational approximations of a root, starting from two approximations x 0 and x 1 , through the recurrence relation which becomes, when f (t) = at 2 − bt − c x n = ax n−1 x n−2 − c ax n−1 + ax n−2 − b .
Proof. We take the sequence g defined by g n = F n+2 + 1 for every n ≥ 0. Since g n − 1 = F n+2 , we have the recurrent formula g n = g n−1 + g n−2 − 1. Let M be the companion matrix of the sequence U . From the matrix product Thus clearly proving the thesis.
The Newton method provides rational approximations for a solution of the equation f (t) = 0. When f (t) = at 2 − bt − c, given an initial approximation y 0 , we recall that the Newton approximations sequence satisfies the recurrence relation On the other hand, the Halley method generates approximations for a solution of t 2 − pt + q = 0 through the following recurrence relation y n = y n−1 + (y 2 n−1 − py n−1 + q)(p − 2y n−1 ) for a given initial step y 0 . In the next theorem we will show how particular subsequences of the sequence x, defined by equation (2.1), generate the Newton and Halley approximations to the root of larger modulus of t 2 − pt + q .
Theorem 3.2. Given the sequences U = W(0, 1, p, q), T = W (1, 0, p, q), and x, defined by equation (2.1), then the recurrence relations respectively generates the subsequences of x producing Newton and Halley approximations for the root of larger modulus of t 2 − pt + q .
Proof. The proof of relation (3.3) is a direct consequence of Corollary 2.4 Starting from x 2 , a repeated use of this equation yields the subsequence (x 2 , x 3 , x 5 , . . . , x 2 n +1 , . . .) , which consists of the Newton approximations for the root of larger modulus of t 2 − pt + q . Relation (3.3) and Corollary 2.4 also provide the proof of recurrence (3.4) for Halley approximations To complete our overview on approximation methods and generalize the results of previous theorem, we consider the Householder method [3], which provides approximations for a solution of a nonlinear equation f (t) = 0. The Householder recurrence relation is for a given initial approximation y 0 , where f (d) is the d-th derivative of f . The Newton and Halley method clearly are particular cases of this method, for d = 1 and d = 2 respectively. Indeed, when f (t) = t 2 − pt + q from (3.5), when d = 1 or d = 2, it is easy to retrieve the formulas (3.1) and (3.2).
Theorem 3.3. With the same hypotheses of Theorem 3.2 , if y n = x k for some k ≥ 2, then y n+1 = x (d+1)k−d , where y n+1 is obtained from relation (3.5) when f (t) = t 2 − pt + q.
Proof. Let α 1 , α 2 be the roots of t 2 − pt + q, we can write Thus, relation (3.5) becomes and with some algebraic manipulations we obtain , then

Applications to continued fractions
In order to show some interesting applications of the exposed results, we study the acceleration of a sequence of rationals which come from the sequence of convergents of a certain continued fraction. The continued fraction, which we will introduce, provides a periodic representation of period 2 for every quadratic irrationality (except for the square roots). Surely its convergents do not generate the best approximations for these irrationalities (because we use rational partial quotients, instead of integers), but between them, using the acceleration method of the previous section, we can find at the same time the approximations derived from the the secant method, the Newton method and the Halley method. We remember that a continued fraction is a representation of a real number α through a sequence of integers as follows: where the integers a 0 , a 1 , . . . can be evaluated with the recurrence relations if α k is not an integer k = 0, 1, 2, . . . , for α 0 = α (see, e.g., [8]). A continued fraction can be expressed in a compact way using the notation [a 0 , a 1 , a 2 , a 3 , . . .]. The finite continued fraction [a 0 , . . . , a n ] = C n = p n q n , n = 0, 1, 2, . . . , is a rational number and is called the n-th convergent of [a 0 , a 1 , a 2 , a 3 , . . .] and the a i 's are called partial quotients. Furthermore, the sequences (p n ) +∞ n=0 and (q n ) +∞ n=0 are recusively defined by the equations p n = a n p n−1 + p n−2 q n = a n q n−1 + q n−2 , ∀n ≥ 2 , (4.1) and initial conditions p 0 = a 0 , p 1 = a 0 a 1 + 1, q 0 = 1, q 1 = a 1 . In the following we will use rational numbers as partial quotients, instead of the usual integers.
Remark 4.1. In general a continued fraction can have complex numbers as partial quotients. In this case given a real number there are no algorithms which provide the partial quotients. However, such a continued fraction can converge to a real number. In the following, we will study continued fractions of period 2 with rational partial quotients which are convergents to the root of larger modulus of a quadratic equation. For a deep study of the convergence of continued fractions, i.e., for an analytic theory of these objects, see [9].

Remark 4.2.
A continued fraction with rational partial quotients an equivalent form as , but the representation is more suitable for the study of the convergents, as we will see soon.
When we study the continued fraction .. , the equations (4.1) become , providing two sequences of rationals . In the next Proposition we study how to determine the convergents through the ratio of two recurrent sequences of integers. .. , let (p n ) +∞ n=0 and (q n ) +∞ n=0 be the sequences which provide the sequence of convergents (C n ) +∞ n=0 defined recursively by equations (4.2). If we consider the sequences (s n ) +∞ Thus, defining the sequence we obtain that the convergents (C n ) of our continued fraction are Clearly, they are not the best approximations of the quadratic irrationality, but since the convergents are determined by the ratio of the sequence σ, we can apply our method of acceleration to such a sequence. In particular, we will see that properly accelerating the convergents sequence, we can find the approximations derived by Newton, Halley and secant method, which compare at the same time between these approximations.
We can directly apply Theorem 3.1, obtaining that (x F n+2 +1 ) +∞ n=0 are the approximations through the secant method of the root of larger modulus of t 2 − bt − ac. Considering the sequencex defined bȳ x n a , ∀n ≥ 2, we havex gn = x gn a = 1 a · x g n−1 x g n−2 + ac x g n−2 + x g n−1 − b = ax g n−1x g n−2 + c ax g n−2 + ax g n−1 − b , i.e. (x gn ) +∞ n=0 are the approximations through the secant method of α. Thus, remembering that aC n = x n+2 for every n ≥ 0, we have that (C F n+2 −1 ) +∞ n=0 are the approximations through the secant method of α. Applying Theorem 3.2 to the sequence x we obtain i.e., x 2 , x 3 , x 5 , x 9 , . . ., x 2 n +1 , . . . are the Newton approximations for the root of larger modulus of t 2 − bt − ac. Now it is easy to see thatx 2 ,x 3 ,x 5 , ...,x 2 n +1 are the Newton approximations of α for every n ≥ 2, i.e., (C 2 n −1 ) +∞ n=0 are the Newton approximations of α. Finally, using Theorem 3.2 again, with similar observations, it is possible to prove that (C 3 n −1 ) +∞ n=0 are the Halley approximations of α.