periodic continued fractions represent quadratic irrationals


This article shows that infinite simple continued fractionsMathworldPlanetmath that are eventually periodic correspond precisely to quadratic irrationals.

Throughout, we will freely use results on convergentsMathworldPlanetmath to a continued fraction; see that article for details.

Definition 1.

A periodic simple continued fraction is a simple continued fraction

[a0,a1,a2,]

such that for some k0 there is m>0 such that whenever rk, we have ar=ar+m. Informally, a periodic continued fractionMathworldPlanetmath is one that eventually repeats. A purely periodic simple continued fraction is one for which k=0; that is, one whose repeating period starts with the initial element.

If

[a0,a1,,ak-1,ak,,ak+j-1,ak,,ak+j-1,ak,]

is a periodic continued fraction, we write it as

[a0,a1,,ak-1,ak,,ak+j-1¯].
Theorem 1.

If

α=[a0,a1,,ar,b1,,bt¯]

is a periodic simple continued fraction, then α is a quadratic irrational p+qd for p,q rational and d squarefreeMathworldPlanetmath. Conversely, every such quadratic irrational is represented by such a continued fraction.

Proof.

The forward direction is pretty straightforward. Given such a continued fraction, let β be the (r+1)st complete convergent, i.e.

β=[b1,,bt¯]

Note first that β must be irrational since the continued fraction for any rational number terminates. Then the article on convergents to a continued fraction shows that

β=βpt+pt-1βqt+qt-1

where the pi,qi are the convergents to the continued fraction for β. Thus

qtβ2+(qt-1-pt)β-pt-1=0

and thus β is irrational and satisfies a quadratic equation so is a quadratic irrational. A simple computation then shows that α is as well.

In the other direction, suppose that α is a quadratic irrational satisfying

aα2+bα+c=0

and with continued fraction representationPlanetmathPlanetmath

α=[a0,a1,]

Then for any n>0, we have

α=tnpn-1+pn-2tnqn-1+qn-2

where the ti are the complete convergents of the continued fraction, so that from the quadratic equation we have

Antn2+Bntn+Cn=0

where

An=apn-12+bpn-1qn-1+cqn-12
Bn=2apn-1pn-2+b(pn-1qn-2+pn-2qn-1)+2cqn-1qn-2
Cn=apn-22+bpn-2qn-2+cqn-22=An-1

Note that An0 for each n>0 since otherwise

apn-12+bpn-1qn-1+cqn-12=0

so that

a(pn-1qn-1)2+bpn-1qn-1+c=0

and the quadratic equation would have a rational root, contradicting the fact that α is irrational.

The remainder of the proof is an elaborate computation that shows we can bound each of An,Bn,Cn independent of n. Assuming that, it follows that there are only a finite number of possibilities for the triples (An,Bn,Cn), so we can choose n1,n2,n3 such that

(An1,Bn1,Cn1)=(An2,Bn2,Cn2)=(An3,Bn3,Cn3)

Then each of tn1,tn2,tn3 is a root of (say)

An1t2+Bn1t+Cn1

so that two of them must be equal. But then tn1=tn2 (say), and

tn1=[an1,an1+1,]
tn2=[an2,an2+1,]

and the continued fraction is periodic.

We proceed to find the bounds. We know that

|α-pn-1qn-1|<1qn-12

so that

α-pn-1qn-1=ϵqn-12

for some ϵ (depending on n) with |ϵ|<1. Thus

An =apn-12+bpn-1qn-1+cqn-12
=a(αqn-1+ϵqn-1)2+bqn-1(αqn-1+ϵqn-1)+cqn-12
=(aα2+bα+c)qn-12+2aαϵ+aϵ2qn-12+bϵ
=2aαϵ+aϵ2qn-12+bϵ

so that

|An|=|2aαϵ+aϵ2qn-12+bϵ|<2|aα|+|a|+|b|

and thus also

|Cn|<2|aα|+|a|+|b|

It remains to bound Bn. But

Bn2-4AnCn=(2Antn+Bn)2

Substituting the values of An,Bn on the right, and using the fact that

tn=-pn-2-xqn-2pn-1-xqn-1

we get after a computation

Bn2-4AnCn =(pn-1qn-2-pn-2qn-1)2axpn-1+bpn-1+bxqn-1+2cqn-1pn-1-xqn-1
=±(2ax+b)pn-1+(2ax2+2bx+2c)qn-1-(2ax2+bx)qn-1pn-1-xqn-1
=±(pn-1-xqn-1)(2ax+b)pn-1-xqn-1=±(2ax+b)

so that

Bn2-4AnCn=(2ax+b)2=b2-4ac

Thus

Bn24|AnCn|+|b2-4ac|<4(2|aα|+|a|+|b|)2+|b2-4ac|

and we have thus bounded all of An,Bn,Cn independent of n. ∎

References

  • 1 G.H. Hardy & E.M. Wright, An Introduction to the Theory of Numbers, Fifth Edition, Oxford Science Publications, 1979.
Title periodic continued fractions represent quadratic irrationals
Canonical name PeriodicContinuedFractionsRepresentQuadraticIrrationals
Date of creation 2013-03-22 18:04:40
Last modified on 2013-03-22 18:04:40
Owner rm50 (10146)
Last modified by rm50 (10146)
Numerical id 9
Author rm50 (10146)
Entry type Theorem
Classification msc 11Y65
Classification msc 11A55
Defines periodic continued fraction
Defines purely periodic