Misplaced Pages

Periodic continued fraction

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.
This article needs additional citations for verification. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed.
Find sources: "Periodic continued fraction" – news · newspapers · books · scholar · JSTOR (January 2014) (Learn how and when to remove this message)

In mathematics, an infinite periodic continued fraction is a simple continued fraction that can be placed in the form

x = a 0 + 1 a 1 + 1 a 2 + 1 a k + 1 a k + 1 + a k + m 1 + 1 a k + m + 1 a k + 1 + 1 a k + 2 + {\displaystyle x=a_{0}+{\cfrac {1}{a_{1}+{\cfrac {1}{a_{2}+{\cfrac {1}{\quad \ddots \quad a_{k}+{\cfrac {1}{a_{k+1}+{\cfrac {\ddots }{\quad \ddots \quad a_{k+m-1}+{\cfrac {1}{a_{k+m}+{\cfrac {1}{a_{k+1}+{\cfrac {1}{a_{k+2}+{\ddots }}}}}}}}}}}}}}}}}}

where the initial block [ a 0 ; a 1 , , a k ] {\displaystyle } of k+1 partial denominators is followed by a block [ a k + 1 , a k + 2 , , a k + m ] {\displaystyle } of m partial denominators that repeats ad infinitum. For example, 2 {\displaystyle {\sqrt {2}}} can be expanded to the periodic continued fraction [ 1 ; 2 , 2 , 2 , . . . ] {\displaystyle } .

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.

Purely periodic and periodic fractions

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

x = [ a 0 ; a 1 , a 2 , , a k , a k + 1 , a k + 2 , , a k + m , a k + 1 , a k + 2 , , a k + m , ] = [ a 0 ; a 1 , a 2 , , a k , a k + 1 , a k + 2 , , a k + m ¯ ] {\displaystyle {\begin{aligned}x&=\\&=\end{aligned}}}

where, in the second line, a vinculum marks the repeating block. Some textbooks use the notation

x = [ a 0 ; a 1 , a 2 , , a k , a ˙ k + 1 , a k + 2 , , a ˙ k + m ] {\displaystyle {\begin{aligned}x&=\end{aligned}}}

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 = [ a 0 ; a 1 , a 2 , , a m 1 ¯ ] , {\displaystyle x=,}

the regular continued fraction x is said to be purely periodic. For example, the regular continued fraction [ 1 ; 1 , 1 , 1 , ] {\displaystyle } of the golden ratio φ is purely periodic, while the regular continued fraction [ 1 ; 2 , 2 , 2 , ] {\displaystyle } of 2 {\displaystyle {\sqrt {2}}} is periodic, but not purely periodic.

As unimodular matrices

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 ; a 1 , a 2 , , a m ¯ ] , {\displaystyle x=,}

This can, in fact, be written as

x = α x + β γ x + δ {\displaystyle x={\frac {\alpha x+\beta }{\gamma x+\delta }}}

with the α , β , γ , δ {\displaystyle \alpha ,\beta ,\gamma ,\delta } being integers, and satisfying α δ β γ = 1. {\displaystyle \alpha \delta -\beta \gamma =1.} Explicit values can be obtained by writing

S = ( 1 0 1 1 ) {\displaystyle S={\begin{pmatrix}1&0\\1&1\end{pmatrix}}}

which is termed a "shift", so that

S n = ( 1 0 n 1 ) {\displaystyle S^{n}={\begin{pmatrix}1&0\\n&1\end{pmatrix}}}

and similarly a reflection, given by

T ( 1 1 0 1 ) {\displaystyle T\mapsto {\begin{pmatrix}-1&1\\0&1\end{pmatrix}}}

so that T 2 = I {\displaystyle T^{2}=I} . Both of these matrices are unimodular, arbitrary products remain unimodular. Then, given x {\displaystyle x} as above, the corresponding matrix is of the form

S a 1 T S a 2 T T S a m = ( α β γ δ ) {\displaystyle S^{a_{1}}TS^{a_{2}}T\cdots TS^{a_{m}}={\begin{pmatrix}\alpha &\beta \\\gamma &\delta \end{pmatrix}}}

and one has

x = [ 0 ; a 1 , a 2 , , a m ¯ ] = α x + β γ x + δ {\displaystyle x=={\frac {\alpha x+\beta }{\gamma x+\delta }}}

as the explicit form. As all of the matrix entries are integers, this matrix belongs to the modular group S L ( 2 , Z ) . {\displaystyle SL(2,\mathbb {Z} ).}

Relation to quadratic irrationals

A quadratic irrational number is an irrational real root of the quadratic equation

a x 2 + b x + c = 0 {\displaystyle ax^{2}+bx+c=0}

where the coefficients a, b, and c are integers, and the discriminant, b 2 4 a c {\displaystyle b^{2}-4ac} , is greater than zero. By the quadratic formula, every quadratic irrational can be written in the form

ζ = P + D Q {\displaystyle \zeta ={\frac {P+{\sqrt {D}}}{Q}}}

where P, D, and Q are integers, D > 0 is not a perfect square (but not necessarily square-free), and Q divides the quantity P 2 D {\displaystyle P^{2}-D} (for example ( 6 + 8 ) / 4 {\displaystyle (6+{\sqrt {8}})/4} ). Such a quadratic irrational may also be written in another form with a square-root of a square-free number (for example ( 3 + 2 ) / 2 {\displaystyle (3+{\sqrt {2}})/2} ) as explained for quadratic irrationals.

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.

Reduced surds

The quadratic surd ζ = P + D Q {\displaystyle \zeta ={\frac {P+{\sqrt {D}}}{Q}}} is said to be reduced if ζ > 1 {\displaystyle \zeta >1} and its conjugate η = P D Q {\displaystyle \eta ={\frac {P-{\sqrt {D}}}{Q}}} satisfies the inequalities 1 < η < 0 {\displaystyle -1<\eta <0} . For instance, the golden ratio ϕ = ( 1 + 5 ) / 2 = 1.618033... {\displaystyle \phi =(1+{\sqrt {5}})/2=1.618033...} is a reduced surd because it is greater than one and its conjugate ( 1 5 ) / 2 = 0.618033... {\displaystyle (1-{\sqrt {5}})/2=-0.618033...} is greater than −1 and less than zero. On the other hand, the square root of two 2 = ( 0 + 8 ) / 2 {\displaystyle {\sqrt {2}}=(0+{\sqrt {8}})/2} is greater than one but is not a reduced surd because its conjugate 2 = ( 0 8 ) / 2 {\displaystyle -{\sqrt {2}}=(0-{\sqrt {8}})/2} is less than −1.

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

ζ = [ a 0 ; a 1 , a 2 , , a m 1 ¯ ] 1 η = [ a m 1 ; a m 2 , a m 3 , , a 0 ¯ ] {\displaystyle {\begin{aligned}\zeta &=\\{\frac {-1}{\eta }}&=\,\end{aligned}}}

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

r = [ a 0 ; a 1 , a 2 , , a 2 , a 1 , 2 a 0 ¯ ] . {\displaystyle {\sqrt {r}}=.}

In particular, if n is any non-square positive integer, the regular continued fraction expansion of √n contains a repeating block of length m, in which the first m − 1 partial denominators form a palindromic string.

Length of the repeating block

By analyzing the sequence of combinations

P n + D Q n {\displaystyle {\frac {P_{n}+{\sqrt {D}}}{Q_{n}}}}

that can possibly arise when ζ = P + D Q {\displaystyle \zeta ={\frac {P+{\sqrt {D}}}{Q}}} is expanded as a regular continued fraction, Lagrange showed that the largest partial denominator ai in the expansion is less than 2 D {\displaystyle 2{\sqrt {D}}} , and that the length of the repeating block is less than 2D.

More recently, sharper arguments based on the divisor function have shown that the length of the repeating block for a quadratic surd of discriminant D is on the order of O ( D ln D ) . {\displaystyle {\mathcal {O}}({\sqrt {D}}\ln {D}).}

Canonical form and repetend

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):

m 0 = 0 {\displaystyle m_{0}=0\,\!}
d 0 = 1 {\displaystyle d_{0}=1\,\!}
a 0 = S {\displaystyle a_{0}=\left\lfloor {\sqrt {S}}\right\rfloor \,\!}
m n + 1 = d n a n m n {\displaystyle m_{n+1}=d_{n}a_{n}-m_{n}\,\!}
d n + 1 = S m n + 1 2 d n {\displaystyle d_{n+1}={\frac {S-m_{n+1}^{2}}{d_{n}}}\,\!}
a n + 1 = S + m n + 1 d n + 1 = a 0 + m n + 1 d n + 1 . {\displaystyle a_{n+1}=\left\lfloor {\frac {{\sqrt {S}}+m_{n+1}}{d_{n+1}}}\right\rfloor =\left\lfloor {\frac {a_{0}+m_{n+1}}{d_{n+1}}}\right\rfloor \!.}

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 [ a 0 ; a 1 , a 2 , a 3 , ] {\displaystyle } is the continued fraction expansion:

S = a 0 + 1 a 1 + 1 a 2 + 1 a 3 + {\displaystyle {\sqrt {S}}=a_{0}+{\cfrac {1}{a_{1}+{\cfrac {1}{a_{2}+{\cfrac {1}{a_{3}+\,\ddots }}}}}}}

Example

To obtain √114 as a continued fraction, begin with m0 = 0; d0 = 1; and a0 = 10 (10 = 100 and 11 = 121 > 114 so 10 chosen).

114 = 114 + 0 1 = 10 + 114 10 1 = 10 + ( 114 10 ) ( 114 + 10 ) 114 + 10 = 10 + 114 100 114 + 10 = 10 + 1 114 + 10 14 . {\displaystyle {\begin{aligned}{\sqrt {114}}&={\frac {{\sqrt {114}}+0}{1}}=10+{\frac {{\sqrt {114}}-10}{1}}=10+{\frac {({\sqrt {114}}-10)({\sqrt {114}}+10)}{{\sqrt {114}}+10}}\\&=10+{\frac {114-100}{{\sqrt {114}}+10}}=10+{\frac {1}{\frac {{\sqrt {114}}+10}{14}}}.\end{aligned}}}
m 1 = d 0 a 0 m 0 = 1 10 0 = 10 . {\displaystyle m_{1}=d_{0}\cdot a_{0}-m_{0}=1\cdot 10-0=10\,.}
d 1 = S m 1 2 d 0 = 114 10 2 1 = 14 . {\displaystyle d_{1}={\frac {S-m_{1}^{2}}{d_{0}}}={\frac {114-10^{2}}{1}}=14\,.}
a 1 = a 0 + m 1 d 1 = 10 + 10 14 = 20 14 = 1 . {\displaystyle a_{1}=\left\lfloor {\frac {a_{0}+m_{1}}{d_{1}}}\right\rfloor =\left\lfloor {\frac {10+10}{14}}\right\rfloor =\left\lfloor {\frac {20}{14}}\right\rfloor =1\,.}

So, m1 = 10; d1 = 14; and a1 = 1.

114 + 10 14 = 1 + 114 4 14 = 1 + 114 16 14 ( 114 + 4 ) = 1 + 1 114 + 4 7 . {\displaystyle {\frac {{\sqrt {114}}+10}{14}}=1+{\frac {{\sqrt {114}}-4}{14}}=1+{\frac {114-16}{14({\sqrt {114}}+4)}}=1+{\frac {1}{\frac {{\sqrt {114}}+4}{7}}}.}

Next, m2 = 4; d2 = 7; and a2 = 2.

114 + 4 7 = 2 + 114 10 7 = 2 + 14 7 ( 114 + 10 ) = 2 + 1 114 + 10 2 . {\displaystyle {\frac {{\sqrt {114}}+4}{7}}=2+{\frac {{\sqrt {114}}-10}{7}}=2+{\frac {14}{7({\sqrt {114}}+10)}}=2+{\frac {1}{\frac {{\sqrt {114}}+10}{2}}}.}
114 + 10 2 = 10 + 114 10 2 = 10 + 14 2 ( 114 + 10 ) = 10 + 1 114 + 10 7 . {\displaystyle {\frac {{\sqrt {114}}+10}{2}}=10+{\frac {{\sqrt {114}}-10}{2}}=10+{\frac {14}{2({\sqrt {114}}+10)}}=10+{\frac {1}{\frac {{\sqrt {114}}+10}{7}}}.}
114 + 10 7 = 2 + 114 4 7 = 2 + 98 7 ( 114 + 4 ) = 2 + 1 114 + 4 14 . {\displaystyle {\frac {{\sqrt {114}}+10}{7}}=2+{\frac {{\sqrt {114}}-4}{7}}=2+{\frac {98}{7({\sqrt {114}}+4)}}=2+{\frac {1}{\frac {{\sqrt {114}}+4}{14}}}.}
114 + 4 14 = 1 + 114 10 14 = 1 + 14 14 ( 114 + 10 ) = 1 + 1 114 + 10 1 . {\displaystyle {\frac {{\sqrt {114}}+4}{14}}=1+{\frac {{\sqrt {114}}-10}{14}}=1+{\frac {14}{14({\sqrt {114}}+10)}}=1+{\frac {1}{\frac {{\sqrt {114}}+10}{1}}}.}
114 + 10 1 = 20 + 114 10 1 = 20 + 14 114 + 10 = 20 + 1 114 + 10 14 . {\displaystyle {\frac {{\sqrt {114}}+10}{1}}=20+{\frac {{\sqrt {114}}-10}{1}}=20+{\frac {14}{{\sqrt {114}}+10}}=20+{\frac {1}{\frac {{\sqrt {114}}+10}{14}}}.}

Now, loop back to the second equation above.

Consequently, the simple continued fraction for the square root of 114 is

114 = [ 10 ; 1 , 2 , 10 , 2 , 1 , 20 ¯ ] . {\displaystyle {\sqrt {114}}=.\,} (sequence A010179 in the OEIS)

√114 is approximately 10.67707 82520. After one expansion of the repetend, the continued fraction yields the rational fraction 21194 1985 {\displaystyle {\frac {21194}{1985}}} whose decimal value is approx. 10.67707 80856, a relative error of 0.0000016% or 1.6 parts in 100,000,000.

Generalized continued fraction

A more rapid method is to evaluate its generalized continued fraction. From the formula derived there:

z = x 2 + y = x + y 2 x + y 2 x + y 2 x + = x + 2 x y 2 ( 2 z y ) y y 2 2 ( 2 z y ) y 2 2 ( 2 z y ) {\displaystyle {\begin{aligned}{\sqrt {z}}={\sqrt {x^{2}+y}}&=x+{\cfrac {y}{2x+{\cfrac {y}{2x+{\cfrac {y}{2x+\ddots }}}}}}\\&=x+{\cfrac {2x\cdot y}{2(2z-y)-y-{\cfrac {y^{2}}{2(2z-y)-{\cfrac {y^{2}}{2(2z-y)-\ddots }}}}}}\end{aligned}}}

and the fact that 114 is 2/3 of the way between 10=100 and 11=121 results in

114 = 1026 3 = 32 2 + 2 3 = 32 3 + 2 / 3 64 + 2 64 + 2 64 + 2 64 + = 32 3 + 2 192 + 18 192 + 18 192 + , {\displaystyle {\begin{aligned}{\sqrt {114}}={\cfrac {\sqrt {1026}}{3}}={\cfrac {\sqrt {32^{2}+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{aligned}}}

which is simply the aforementioned [ 10 ; 1 , 2 , 10 , 2 , 1 , 20 , 1 , 2 ] {\displaystyle } evaluated at every third term. Combining pairs of fractions produces

114 = 32 2 + 2 3 = 32 3 + 64 / 3 2050 1 1 2050 1 2050 = 32 3 + 64 6150 3 9 6150 9 6150 , {\displaystyle {\begin{aligned}{\sqrt {114}}={\cfrac {\sqrt {32^{2}+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{aligned}}}

which is now [ 10 ; 1 , 2 , 10 , 2 , 1 , 20 , 1 , 2 ¯ ] {\displaystyle } evaluated at the third term and every six terms thereafter.

See also

Notes

  1. Pettofrezzo & Byrkit 1970, p. 158.
  2. Long 1972, p. 187.
  3. Khinchin 1964.
  4. Davenport 1982, p. 104.
  5. Hickerson 1973.
  6. Cohn 1977.
  7. Podsypanin 1982.
  8. Beceanu 2003.
  9. Gliga 2006.

References

  • Long, Calvin T. (1972). Elementary Introduction to Number Theory (3 Sub ed.). Waveland Pr Inc. LCCN 77-171950.
Categories: