Associated Topics || Dr. Math Home || Search Dr. Math

### Continued Fractions

```
Date: 07/02/97 at 09:47:23
From: Julia MacDonell
Subject: Continued fraction

What exactly IS a continued fraction?

Thanks!
Jules
```

```
Date: 07/02/97 at 09:56:06
From: Doctor Rob
Subject: Re: Continued fraction

Jules,

A continued fraction is an expression of the form:

b0
a0 + -----------------------
b1
a1 + ------------------
b2
a2 + -------------
b3
a3 + --------
a4 + ...

Here all the ai's and bi's are integers, i >= 0.

It may terminate after a finite number of steps. In that case, when
you evaluate it, you will get a rational number (quotient of two
integers). It may be infinite, in the same way that an infinite series
is, or an infinite decimal expansion is. There is a well-developed
theory of continued fractions, especially "simple" ones (bi = 1 for
all i, and ai > 0 for all i > 1). They have many uses. They can be
helpful in approximating irrational numbers, solving Diophantine
equations, finding units in quadratic number fields, and other places.

If you want more information, you can write again, or consult the
following reference:

C. D. Olds, _Continued Fractions_, New Math Library, vol. 9 (1963: New
York, Random House)

-Doctor Rob,  The Math Forum
Check out our web site!  http://mathforum.org/dr.math/
```

```
Date: 07/03/97 at 20:00:25
From: Julia MacDonell
Subject: expressing continued fractions

How would you express (sqrt A) - B as a continued fraction?

Thank you!
```

```
Date: 07/04/97 at 05:49:35
From: Doctor Anthony
Subject: Re: expressing continued fractions

The general expression:

sqrt(N) + b
-----------     where N, b, r are integers (N > 0)
r

can be expressed as a simple recurring continued fraction.

We can write the stages as follows:

sqrt(N)+b1          sqrt(N)-b2                r2
----------  = a1 + -----------    = a1 +  ----------
r1                 r1                 sqrt(N)+b2

1
= a1 +  ------------
sqrt(N)+b2
-----------
r2

a1 is the integral part of [sqrt(N)+b1]/r1 and:

b2 = a1*r1 - b1              N - b2^2
r2 = ----------
r1

Apply these three expressions for calculating a(n), b(n+1), r(n+1) to
the expression of:

sqrt(37)+8
----------      as a continued fraction.
9

Here a1 = integral part of expression = 1, also b1 = 8, r1 = 9.

Then b2 = 1 x 9 - 8 = 1     r2 = [37-1]/9 = 4

So the continued fraction at this stage is:

1
1  +  ----------
sqrt(37)+1
----------
4

It is better to lay out the working in tabular form as follows, using
the expressions for a(n), b(n+1), r(n+1) given above.

n    1     2      3      4      5       6
-------------------------------------------
b    8     1      3      4      5       3
r    9     4      7      3      4       7
a    1     1      1      3      2       1

This gives:

sqrt(37)+8          1     1      1     1      1
----------  =  1 + ---- -----  -----  ----  -----
9               1+    1+    3+     2+     1+

The example you gave [sqrt(a)-b]/1 is done exactly as shown above,
with r1 = 1.

-Doctor Anthony,  The Math Forum
Check out our web site!  http://mathforum.org/dr.math/
```
Associated Topics:
High School Sequences, Series

Search the Dr. Math Library:

 Find items containing (put spaces between keywords):   Click only once for faster results: [ Choose "whole words" when searching for a word like age.] all keywords, in any order at least one, that exact phrase parts of words whole words

Submit your own question to Dr. Math
Math Forum Home || Math Library || Quick Reference || Math Forum Search