# Definition:Numerators and Denominators of Continued Fraction

*Not to be confused with Definition:Partial Numerator or Definition:Partial Denominator.*

This page has been identified as a candidate for refactoring of basic complexity.In particular: I'd forgotten about thisUntil this has been finished, please leave
`{{Refactor}}` in the code.
Because of the underlying complexity of the work needed, it is recommended that you do not embark on a refactoring task until you have become familiar with the structural nature of pages of $\mathsf{Pr} \infty \mathsf{fWiki}$.To discuss this page in more detail, feel free to use the talk page.When this work has been completed, you may remove this instance of `{{Refactor}}` from the code. |

## Definition

Let $F$ be a field.

Let $n \in \N \cup \set \infty$ be an extended natural number.

Let $C = \sqbrk {a_0, a_1, a_2, \ldots}$ be a continued fraction in $F$ of length $n$.

### Definition 1: recursive definition

The **sequence of numerators** of $C$ is the sequence $\sequence {p_k}_{0 \mathop \le k \mathop \le n}$ that is recursively defined by:

- $p_k = \begin {cases}

a_0 & : k = 0 \\ a_1 a_0 + 1 & : k = 1 \\ a_k p_{k - 1} + p_{k - 2} & : k \ge 2

\end {cases}$

The **sequence of denominators** of $C$ is the sequence $\sequence {q_k}_{0 \mathop \le k \mathop \le n}$ that is recursively defined by:

- $q_k = \begin {cases}

1 & : k = 0 \\ a_1 & : k = 1 \\ a_k q_{k - 1} + q_{k - 2} & : k \ge 2

\end {cases}$

### Definition 2: using matrix products

Let $k \ge 0$, and let the indexed matrix product:

- $\ds \prod_{i \mathop = 0}^k \begin {pmatrix}

a_i & 1 \\ 1 & 0

\end {pmatrix} = \begin {pmatrix}

x_{1 1}^{\paren k} & x_{1 2}^{\paren k} \\ x_{2 1}^{\paren k} & x_{2 2}^{\paren k}

\end {pmatrix}$
The $k$th **numerator** is $x_{1 1}^{\paren k}$ and the $k$th **denominator** is $x_{2 1}^{\paren k}$.

This definition needs to be completed.In particular: for generalized continued fractionsYou can help $\mathsf{Pr} \infty \mathsf{fWiki}$ by adding or completing the definition.To discuss this page in more detail, feel free to use the talk page.When this work has been completed, you may remove this instance of `{{DefinitionWanted}}` from the code.If you would welcome a second opinion as to whether your work is correct, add a call to `{{Proofread}}` the page. |