]> Continued Fractions - Periodic Continued Fractions

Periodic Continued Fractions

A periodic continued fraction [a 1 ;a 2 ,...] is periodic if the sequence eventually repeats, i.e there exists some m,n with a m+i=a n+i for all i0 . Our first example of a continued fraction, [1 ;2,2 ,...], is periodic and turned out to be 2 . In fact:

Theorem: Any periodic continued fraction represents a root of a quadratic equation with integer coefficients.

Proof: Let x k=[a k;a k+1 ,...]. For some m<n we have x m=x n. Let p i,q i be the convergents of x n. Then

x m=x n=p nm1 x mp nm2 q nm1 x mq nm2

thus x m satisfies a quadratic equation with integer coefficients.

As x 1 =p m1 x m+p m2 q m1 x m+q m2 the same is true for x 1 .

The converse is also true:

Theorem: An irrational root of a ax 2 +bx+c=0 where a,b,c are integers has a periodic continued fraction expansion.

Proof: Let x be an irrational root with continued fraction expansion [a 1 ;a 2 ,...], and define x k=[a k;a k+1 ,...]. Recall x=x kp k1 +p k2 x kq k1 +q k2 , which we relabel as

x=rz+stz+u,ruts=1

From results on the convergents we have

x=rt+εt 2 =su+ηu 2

for some reals ε,η of absolute value less than 1.

Substituting x=rz+stz+u into the quadratic gives Az 2 +Bz+C=0 where

A = ar 2 +brt+ct 2 B = 2 ars+b(ru+ts)+2 ctu C = as 2 +bsu+cu 2

If we show A,B,C are bounded, that is, their magnitude is less than some positive integer depending only on x, then z can be a solution of only a finite number of quadratic equations. Then as x is irrational, the continued fraction expansion is infinite, and since z can only take finitely many possible values, eventually the fraction repeats itself.

Firstly,

At 2 = a(rt) 2 +b(rt)+c = ax 2 +bx+c2 aεxt 2 +aε 2 t 4 bεt 2

Using ax 2 +bx+c=0 and the triangle inequality yields

A2 ax+a+b

showing A is bounded. Replacing r,t with s,u shows C is bounded.

As for B, we can either show 4 ACB 2 =4 acb 2 by direct computation or that

B=(εut+ηtu)(2 ax+b)+2 aεηtu

Since r/t,s/u are successive convergents, ε and η are opposite in sign, so:

εut+ηtuεutηtu

From the definitions of ε and η,

ru+sttu=εt 2 ηu 2

thus εu/tηt/u=rust=1 , that is,

B2 ax+b+2 a

Pure Periodicity

Suppose a=[a 1 ;a 2 ,...,a k,a 1 ,a 2 ,...,a k,...]. Then a=p ka+p k1 q ka+q k1 so a must be a root of

q kx 2 +(q k1 p k)xp k1 =0

The left-hand side takes a negative value when x=0 , and a positive value when x=1 , thus there is root in (1 ,0 ) and it is the conjugate of a.

A positive root of a quadratic equation with integer coefficients is called a reduced quadratic surd if it is greater than 1 and its conjugate lies in (1 ,0 ).

Theorem: A real a has a pure periodic fraction expansion if and only if a is a reduced quadratic surd.

Proof: We have just seen the proof for one direction. As for the other, let let f(x) be a quadratic equation for which a is reduced quadratic surd. Let a=[a 1 ;a 2 ,...]. Define x k=[a k;a k+1 ,...], Let y 1 be the conjugate of a.

Considering f(a 1 +1 x 2 )=0 gives a quadratic equation for x 2 . Let y 2 be the other solution, the conjugate of x 2 . We have f(y 1 )=0 and f(a 1 +1 y 2 )=0 . Since neither root is equal to x 1 , and quadratic equations have two roots, we have y 1 1 y 2 =a 1 . Since a 1 1 and y 1 >0 we see 1 <y 2 <0 , hence x 2 is also a reduced quadratic surd. Inducting shows x k is a reduced quadratic surd for all k, and that y k=a k+1 y k+1 .

Since 0 <y k<1 , this last equation implies a k=1 y k+1 .

Now suppose the continued fraction expansion for a repeats at a r=a r+k for some k and r>1 . Then x r=x r+k and y r=y r+k, and hence a r1 =a r+k1 . Repeating the argument gives a=[a 1 ;a 2 ,...,a k,a 1 ,...]

Corollary: The continued fraction expansion of D where D is a nonsquare positive integer has the form [a 1 ;a 2 ,...,a k,a 2 ,...,a k,...]

The same can be said for any positive real of the form D+n where n is an integer and D is a nonsquare positive integer.