# Fundamental recurrence formulas

{{ safesubst:#invoke:Unsubst||$N=Unreferenced |date=__DATE__ |$B= {{#invoke:Message box|ambox}} }} In the theory of continued fractions, the fundamental recurrence formulas relate the partial numerators and the partial denominators with the numerators and denominators of the fraction's successive convergents. Let

${\displaystyle x=b_{0}+{\cfrac {a_{1}}{b_{1}+{\cfrac {a_{2}}{b_{2}+{\cfrac {a_{3}}{b_{3}+{\cfrac {a_{4}}{b_{4}+\ddots \,}}}}}}}}}$

be a general continued fraction, where the an (the partial numerators) and the bn (the partial denominators) are numbers. Denoting the successive numerators and denominators of the fraction by An and Bn, respectively, the fundamental recurrence formulas are given by

{\displaystyle {\begin{aligned}A_{0}&=b_{0}&B_{0}&=1\\A_{1}&=b_{1}b_{0}+a_{1}&B_{1}&=b_{1}\\A_{n+1}&=b_{n+1}A_{n}+a_{n+1}A_{n-1}&B_{n+1}&=b_{n+1}B_{n}+a_{n+1}B_{n-1}\,\end{aligned}}}

The continued fraction's successive convergents are then given by

${\displaystyle x_{n}={\frac {A_{n}}{B_{n}}}.\,}$

These recurrence relations are due to John Wallis (1616-1703).

## The determinant formula

It can be shown, by induction, that the determinant formula

${\displaystyle A_{n-1}B_{n}-A_{n}B_{n-1}=(-1)^{n}a_{1}a_{2}\cdots a_{n}=\Pi _{i=1}^{n}(-a_{i})\,}$

holds for all positive integers n > 0. If neither Bn-1 nor Bn is zero, this relationship can also be used to express the difference between two successive convergents of the continued fraction.

${\displaystyle x_{n-1}-x_{n}={\frac {A_{n-1}}{B_{n-1}}}-{\frac {A_{n}}{B_{n}}}=(-1)^{n}{\frac {a_{1}a_{2}\cdots a_{n}}{B_{n}B_{n-1}}}={\frac {\Pi _{i=1}^{n}(-a_{i})}{B_{n}B_{n-1}}}\,}$

It is necessary but not sufficient for the convergence of an infinite continued fraction that the difference between successive convergents approaches zero; this is the subject of the convergence problem. (Note: By definition, the continued fraction converges if the sequence of convergents has a limit.)

## A simple example

Consider the regular continued fraction in canonical form that represents the golden ratio φ:

${\displaystyle x=1+{\cfrac {1}{1+{\cfrac {1}{1+{\cfrac {1}{1+{\cfrac {1}{1+\ddots \,}}}}}}}}}$

Applying the fundamental recurrence formulas we find that the successive numerators An are {1, 2, 3, 5, 8, 13, ...} and the successive denominators Bn are {1, 1, 2, 3, 5, 8, ...}, the Fibonacci numbers. Since all the partial numerators in this example are equal to one, the determinant formula assures us that the absolute value of the difference between successive convergents approaches zero quite rapidly.