The algorithm stops after finitely many steps if and only if x is rational. The above expansion is called The simple continued fraction of x. It is customarily written x = [a0,a1, . . . ,an,. ].
We call convergents of x the reduced fractions difined by:
If there exists k ≥ 0 and m > 0 such that whenever r > k, we have ar = ar+m, the continued fraction is said periodic, with period (b1, . . . ,bm) = (ak+1, . . . ,ak+m) and pre-period (a0,a1, . . . ,ak), which can be written for simplicity $x=\left[ {{a}_{0}},{{a}_{1}},\cdots {{a}_{k}},\overline{{{b}_{1}}\,,\cdots {{b}_{m}}} \right].$These so-called periodic continued fractions are precisely those that represent quadratic irrationalities.
We find a closed form expression for $x=\left[ {{a}_{0}},{{a}_{1}},\cdots {{a}_{k}},\overline{{{b}_{1}}\,,\cdots {{b}_{m}}} \right]$, which generalized a previous resut of Roger B. Nelsen.
Main result
Lemma 1
Let x > 0 such that$x=a+\frac{b}{cx},then\,x\,=\frac{1}{2}\left( {{a}^{2}}+\sqrt{{{a}^{2}}+4\frac{b}{c}} \right)$
Proof. Consider the Following figure:
We have ${{\left( 2x-a \right)}^{2}}={{a}^{2}}+4\frac{b}{c},\,\text{then }x=\frac{1}{2}\left( {{a}^{2}}+\sqrt{{{a}^{2}}+4\frac{b}{c}} \right)\,\,.$
Let$x=\left[ {{a}_{0}},{{a}_{1}},\ldots ,{{a}_{k}},\overline{{{b}_{1}},\cdots {{b}_{m}}} \right],$be a periodic continued fraction, with period (b1, . . . ,bm) and pre-period (a0,a1, . . . ,ak).
We find a closed form expression $\text{for}x=\left[ {{a}_{0}},{{a}_{1}},\cdots ,{{a}_{k}},\overline{{{b}_{1}},\cdots ,{{b}_{m}}} \right],$which generalized a previous resut of Roger B. Nelsen.