Continued Fraction Expansion of Irrational Square Root/Examples/8

Example of Continued Fraction Expansion of Irrational Square Root
The continued fraction expansion of the square root of $8$ is given by:
 * $\sqrt 8 = \sqbrk {2, \sequence {1, 4} }$

Proof
Let $\sqrt 8 = \sqbrk {a_0, a_1, a_2, a_3, \ldots}$

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 = \floor {\dfrac {\floor {\sqrt 8} + P_r} {Q_r} }$

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}$


 * }

and the cycle is complete:
 * $\sequence {1, 4}$

[[Category:8]]