Continued Fractions

# Continued Fractions

Definition: A Finite Continued Fraction denoted by $\langle x_0; x_1, x_2, ..., x_n \rangle$ is a fraction of the form $x_0 + \frac{1}{x_1 + \frac{1}{x_2 + ... + \frac{1}{x_n}}}$. An Infinite Continued Fraction denoted by $\langle x_0; x_1, x_2, ... \rangle$ is a fraction of the form $\displaystyle{x_0 + \frac{1}{x_1 + \frac{1}{x_2 + \frac{1}{x_3 + ...}}}}$. A continued fraction (finite or infinite) is said to be Simple if each $x_i \in \mathbb{Z}$. |

Consider the finite simple continued fraction $x = \langle 2; 1, 1, 3 \rangle$. Then:

(1)\begin{align} x &= 2 + \frac{1}{1 + \frac{1}{1 + \frac{1}{3}}} \\ &= 2 + \frac{1}{1 + \frac{1}{\left ( \frac{4}{3} \right )}} \\ &= 2 + \frac{1}{1 + \frac{3}{4}} \\ &= 2 + \frac{1}{\left ( \frac{7}{4} \right )} \\ &= 2 + \frac{4}{7} \\ &= \frac{18}{7} \end{align}

There are a few identities for continued fractions. First:

(2)\begin{align} \quad \langle x_0; x_1, x_2, ... \rangle = x_0 + \frac{1}{x_1 + \frac{1}{x_2 + \frac{1}{x_3 + ...}}} = x_0 + \frac{1}{\langle x_1; x_2, x_3, ... \rangle} \end{align}

The second is:

(3)\begin{align} \quad \langle x_0; x_1, x_2, ..., x_n \rangle = x_0 + \frac{1}{x_1 + \frac{1}{x_2 + \frac{1}{x_3 + ... + \frac{1}{x_{n-1} + \frac{1}{x_n}}}}} = \langle x_0; x_1 ..., x_{n-1} + \frac{1}{x_n} \rangle \end{align}