Continued Fraction Expansion of Irrational Square Root/Examples/29

Examples of Continued Fraction Expansion of Irrational Square Root
The continued fraction expansion of the square root of $29$ is given by:
 * $\sqrt {29} = \left[{5, \left \langle{2, 1, 1, 2, 10}\right \rangle}\right]$

Proof
Let $\sqrt {29} = \left[{a_0, a_1, a_2, a_3, \ldots}\right]$

From Partial Quotients of Continued Fraction Expansion of Irrational Square Root, the partial quotients of this continued fraction expansion can be calculated as:


 * $a_r = \left\lfloor{\dfrac{\left\lfloor{\sqrt {29} }\right\rfloor + P_r} {Q_r} }\right\rfloor$

where:


 * $P_r = \begin{cases} 0 & : r = 0 \\

a_{r - 1} Q_{r - 1} - P_{r - 1} & : r > 0 \\ \end{cases}$


 * $Q_r = \begin{cases} 1 & : r = 0 \\

\dfrac {n - {P_r}^2} {Q_{r - 1} } & : r > 0 \\ \end{cases}$

First note that:
 * $5^2 < 29 < \left({5 + 1}\right)^2$

and so $a_0 = 5$.

$a_1$:

$a_2$:

$a_3$:

$a_4$:

$a_5$:

and the cycle is complete:
 * $\left\langle{2, 1, 1, 2, 10}\right\rangle$