In mathematics, an infinite periodic continued fraction is a simple continued fraction that can be placed in the form
x=a0+\cfrac{1}{a1+\cfrac{1}{a2+\cfrac{1}{ \ddots ak+\cfrac{1}{ak+1+\cfrac{\ddots}{ \ddots ak+m-1+\cfrac{1}{ak+m+\cfrac{1}{ak+1+\cfrac{1}{ak+2+{\ddots}}}}}}}}}
where the initial block
[a0;a1,...,ak]
[ak+1,ak+2,...,ak+m]
\sqrt2
[1;2,2,2,...]
This article considers only the case of periodic regular continued fractions. In other words, the remainder of this article assumes that all the partial denominators ai (i ≥ 1) are positive integers. The general case, where the partial denominators ai are arbitrary real or complex numbers, is treated in the article convergence problem.
Since all the partial numerators in a regular continued fraction are equal to unity we can adopt a shorthand notation in which the continued fraction shown above is written as
\begin{align} x&=[a0;a1,a2,...,ak,ak+1,ak+2,...,ak+m,ak+1,ak+2,...,ak+m,...]\\ &=[a0;a1,a2,...,ak,\overline{ak+1,ak+2,...,ak+m
where, in the second line, a vinculum marks the repeating block. Some textbooks use the notation
\begin{align} x&=[a0;a1,a2,...,a
|
k+1,ak+2,...,
a |
k+m] \end{align}
where the repeating block is indicated by dots over its first and last terms.
If the initial non-repeating block is not present - that is, if k = -1, a0 = am and
x=[\overline{a0;a1,a2,...,am-1
the regular continued fraction x is said to be purely periodic. For example, the regular continued fraction
[1;1,1,1,...]
[1;2,2,2,...]
\sqrt2
Periodic continued fractions are in one-to-one correspondence with the real quadratic irrationals. The correspondence is explicitly provided by Minkowski's question-mark function. That article also reviews tools that make it easy to work with such continued fractions. Consider first the purely periodic part
x=[0;\overline{a1,a2,...,am}],
x=
\alphax+\beta | |
\gammax+\delta |
\alpha,\beta,\gamma,\delta
\alpha\delta-\beta\gamma=1.
S=\begin{pmatrix}1&0\ 1&1\end{pmatrix}
Sn=\begin{pmatrix}1&0\ n&1\end{pmatrix}
T\mapsto\begin{pmatrix}-1&1\ 0&1\end{pmatrix}
T2=I
x
a1 | |
S |
a2 | |
TS |
T …
am | |
TS |
=\begin{pmatrix}\alpha&\beta\ \gamma&\delta\end{pmatrix}
x=[0;\overline{a1,a2,...,am}]=
\alphax+\beta | |
\gammax+\delta |
SL(2,Z).
A quadratic irrational number is an irrational real root of the quadratic equation
ax2+bx+c=0
where the coefficients a, b, and c are integers, and the discriminant,
b2-4ac
\zeta=
P+\sqrt{D | |
where P, D, and Q are integers, D > 0 is not a perfect square (but not necessarily square-free), and Q divides the quantity
P2-D
(6+\sqrt{8})/4
(3+\sqrt{2})/2
By considering the complete quotients of periodic continued fractions, Euler was able to prove that if x is a regular periodic continued fraction, then x is a quadratic irrational number. The proof is straightforward. From the fraction itself, one can construct the quadratic equation with integral coefficients that x must satisfy.
Lagrange proved the converse of Euler's theorem: if x is a quadratic irrational, then the regular continued fraction expansion of x is periodic. Given a quadratic irrational x one can construct m different quadratic equations, each with the same discriminant, that relate the successive complete quotients of the regular continued fraction expansion of x to one another. Since there are only finitely many of these equations (the coefficients are bounded), the complete quotients (and also the partial denominators) in the regular continued fraction that represents x must eventually repeat.
\zeta=
P+\sqrt{D | |
\zeta>1
η=
P-\sqrt{D | |
-1<η<0
\phi=(1+\sqrt{5})/2=1.618033...
(1-\sqrt{5})/2=-0.618033...
\sqrt{2}=(0+\sqrt{8})/2
-\sqrt{2}=(0-\sqrt{8})/2
Galois proved that the regular continued fraction which represents a quadratic surd ζ is purely periodic if and only if ζ is a reduced surd. In fact, Galois showed more than this. He also proved that if ζ is a reduced quadratic surd and η is its conjugate, then the continued fractions for ζ and for (-1/η) are both purely periodic, and the repeating block in one of those continued fractions is the mirror image of the repeating block in the other. In symbols we have
\begin{align} \zeta&=[\overline{a0;a1,a2,...,am-1
where ζ is any reduced quadratic surd, and η is its conjugate.
From these two theorems of Galois a result already known to Lagrange can be deduced. If r > 1 is a rational number that is not a perfect square, then
\sqrt{r}=[a0;\overline{a1,a2,...,a2,a1,2a0}].
In particular, if n is any non-square positive integer, the regular continued fraction expansion of contains a repeating block of length m, in which the first m - 1 partial denominators form a palindromic string.
By analyzing the sequence of combinations
Pn+\sqrt{D | |
that can possibly arise when
\zeta=
P+\sqrt{D | |
2\sqrt{D}
l{O}(\sqrt{D}ln{D}).
The following iterative algorithm can be used to obtain the continued fraction expansion in canonical form (S is any natural number that is not a perfect square):
m0=0
d0=1
a0=\left\lfloor\sqrt{S}\right\rfloor
mn+1=dnan-mn
dn+1=
| |||||||
dn |
an+1=\left\lfloor
\sqrt{S | |
+m |
n+1
Notice that mn, dn, and an are always integers.The algorithm terminates when this triplet is the same as one encountered before.The algorithm can also terminate on ai when ai = 2 a0, which is easier to implement.
The expansion will repeat from then on. The sequence
[a0;a1,a2,a3,...]
\sqrt{S}=a0+\cfrac{1}{a1+\cfrac{1}{a2+\cfrac{1}{a3+\ddots}}}
To obtain as a continued fraction, begin with m0 = 0; d0 = 1; and a0 = 10 (102 = 100 and 112 = 121 > 114 so 10 chosen).
\begin{align} \sqrt{114}&=
\sqrt{114 | |
+0}{1} |
=10+
\sqrt{114 | |
-10}{1} |
=10+
(\sqrt{114 | |
-10)(\sqrt{114}+10)}{\sqrt{114}+10} |
\\ &=10+
114-100 | |
\sqrt{114 |
+10}=10+
1 | |||
|
{14}}. \end{align}
m1=d0 ⋅ a0-m0=1 ⋅ 10-0=10.
d1=
| |||||||
d0 |
=
114-102 | |
1 |
=14.
a1=\left\lfloor
a0+m1 | |
d1 |
\right\rfloor=\left\lfloor
10+10 | |
14 |
\right\rfloor=\left\lfloor
20 | |
14 |
\right\rfloor=1.
So, m1 = 10; d1 = 14; and a1 = 1.
\sqrt{114 | |
+10}{14} |
=1+
\sqrt{114 | |
-4}{14} |
=1+
114-16 | |
14(\sqrt{114 |
+4)}=1+
1 | |||
|
{7}}.
Next, m2 = 4; d2 = 7; and a2 = 2.
\sqrt{114 | |
+4}{7} |
=2+
\sqrt{114 | |
-10}{7} |
=2+
14 | |
7(\sqrt{114 |
+10)}=2+
1 | |||
|
{2}}.
\sqrt{114 | ||||||
|
+10)}=10+
1 | |||
|
{7}}.
\sqrt{114 | ||||||
|
+4)}=2+
1 | |||
|
{14}}.
\sqrt{114 | ||||||
|
+10)}=1+
1 | |||
|
{1}}.
\sqrt{114 | ||||||
|
+10}=20+
1 | |||
|
{14}}.
Now, loop back to the second equation above.
Consequently, the simple continued fraction for the square root of 114 is
\sqrt{114}=[10;\overline{1,2,10,2,1,20}].
is approximately 10.67707 82520. After one expansion of the repetend, the continued fraction yields the rational fraction
21194 | |
1985 |
A more rapid method is to evaluate its generalized continued fraction. From the formula derived there:
\begin{align} \sqrt{z}=\sqrt{x2+y}&=x+\cfrac{y}{2x+\cfrac{y}{2x+\cfrac{y}{2x+\ddots}}}\\ &=x+\cfrac{2x ⋅ y}{2(2z-y)-y-\cfrac{y2}{2(2z-y)-\cfrac{y2}{2(2z-y)-\ddots}}} \end{align}
and the fact that 114 is 2/3 of the way between 102=100 and 112=121 results in
\begin{align} \sqrt{114}=\cfrac{\sqrt{1026}}{3}=\cfrac{\sqrt{322+2}}{3}&=\cfrac{32}{3}+\cfrac{2/3}{64+\cfrac{2}{64+\cfrac{2}{64+\cfrac{2}{64+\ddots}}}}\\ &=\cfrac{32}{3}+\cfrac{2}{192+\cfrac{18}{192+\cfrac{18}{192+\ddots}}}, \end{align}
which is simply the aforementioned
[10;1,2,10,2,1,20,1,2]
\begin{align} \sqrt{114}=\cfrac{\sqrt{322+2}}{3}&=\cfrac{32}{3}+\cfrac{64/3}{2050-1-\cfrac{1}{2050-\cfrac{1}{2050-\ddots}}}\\ &=\cfrac{32}{3}+\cfrac{64}{6150-3-\cfrac{9}{6150-\cfrac{9}{6150-\ddots}}}, \end{align}
which is now
[10;1,2,\overline{10,2,1,20,1,2}]