 
In this book we will assume that the  are real numbers and
 are real numbers and
 for
 for  , and the expression may or may not go on
indefinitely.  More general notions of continued fractions have been
extensively studied, but they are beyond the scope of this book.  
We will be most interested in the case when the
, and the expression may or may not go on
indefinitely.  More general notions of continued fractions have been
extensively studied, but they are beyond the scope of this book.  
We will be most interested in the case when the  are all
integers.
 are all
integers.   
We denote the continued fraction displayed above by
![$\displaystyle [a_0,a_1,a_2,\ldots].
$](img1551.png) 
For example,
![$\displaystyle [1,2] = 1+\frac{1}{2} = \frac{3}{2},$](img1552.png) 
| ![$\displaystyle [3, 7, 15, 1, 292 ]$](img1553.png) |  | |
|  | 
| ![$\displaystyle [2, 1, 2, 1, 1, 4, 1, 1, 6]$](img1556.png) |  | |
|  | ||
|  | 
 and the second
 and the second  .
.
Continued fractions have many applications.  For example, they 
 provide an algorithmic way to recognize a decimal
approximation to a rational number.  Continued fractions also suggest
a sense in which  might be ``less complicated'' than
 might be ``less complicated'' than  (see
Example 5.2.4 and Section 5.3).
 (see
Example 5.2.4 and Section 5.3).
In Section 5.1 we study continued fractions
![$ [a_0,a_1,\ldots,a_n]$](img1561.png) of finite length and lay the foundations for
our later investigations.  In Section 5.2 we give the
continued fraction procedure, which associates to a real number
 of finite length and lay the foundations for
our later investigations.  In Section 5.2 we give the
continued fraction procedure, which associates to a real number  a
sequence
 a
sequence 
 of integers such that
 of integers such that 
![$ x = \lim_{n\rightarrow \infty}
[a_0,a_1,\ldots,a_n]$](img1563.png) .  We also prove that if
.  We also prove that if 
 is any
infinite sequence of positive integers, then the sequence
 is any
infinite sequence of positive integers, then the sequence
![$ c_n=[a_0,a_1,\ldots,a_n]$](img1564.png) converges; more generally, we prove that if
the
 converges; more generally, we prove that if
the  are arbitrary positive real numbers and
 are arbitrary positive real numbers and 
 diverges then
 diverges then  converges.  In Section 5.4, we
prove that a continued fraction with
 converges.  In Section 5.4, we
prove that a continued fraction with 
 is (eventually)
periodic if and only if its value is a non-rational root of a
quadratic polynomial, then discuss open questions concerning continued
fractions of roots of irreducible polynomials of degree greater
than
 is (eventually)
periodic if and only if its value is a non-rational root of a
quadratic polynomial, then discuss open questions concerning continued
fractions of roots of irreducible polynomials of degree greater
than  .  We conclude the chapter with applications of continued
fractions to recognizing approximations to rational numbers
(Section 5.5) and writing integers as sums
of two squares (Section 5.6).
.  We conclude the chapter with applications of continued
fractions to recognizing approximations to rational numbers
(Section 5.5) and writing integers as sums
of two squares (Section 5.6).
The reader is encouraged to read more about continued fractions in [#!hardywright!#, Ch. X], [#!khintchine!#], [#!burton!#, §13.3], and [#!niven-zuckerman-montgomery!#, Ch. 7].