
\input amstex


\magnification=1300


\loadmsbm

\input colordvi

\nopagenumbers
\parindent=0pt

\def\cgy{\GreenYellow}     % GreenYellow  Approximate PANTONE 388
\def\cyy{\Yellow}	  % Yellow  Approximate PANTONE YELLOW
\def\cgo{\Goldenrod}	  % Goldenrod  Approximate PANTONE 109
\def\cda{\Dandelion}	  % Dandelion  Approximate PANTONE 123
\def\capr{\Apricot}	  % Apricot  Approximate PANTONE 1565
\def\cpe{\Peach}		  % Peach  Approximate PANTONE 164
\def\cme{\Melon}		  % Melon  Approximate PANTONE 177
\def\cyo{\YellowOrange}	  % YellowOrange  Approximate PANTONE 130
\def\coo{\Orange}	  % Orange  Approximate PANTONE ORANGE-021
\def\cbo{\BurntOrange}	  % BurntOrange  Approximate PANTONE 388
\def\cbs{\Bittersweet}	  % Bittersweet  Approximate PANTONE 167
%\def\creo{\RedOrange}	  % RedOrange  Approximate PANTONE 179
\def\cma{\Mahogany}	  % Mahogany  Approximate PANTONE 484
\def\cmr{\Maroon}	  % Maroon  Approximate PANTONE 201
\def\cbr{\BrickRed}	  % BrickRed  Approximate PANTONE 1805
\def\crr{\Red}		  % Red  VERY-Approx PANTONE RED
\def\cor{\OrangeRed}	  % OrangeRed  No PANTONE match
\def\paru{\RubineRed}	  % RubineRed  Approximate PANTONE RUBINE-RED
\def\cwi{\WildStrawberry}  % WildStrawberry  Approximate PANTONE 206
\def\csa{\Salmon}	  % Salmon  Approximate PANTONE 183
\def\ccp{\CarnationPink}	  % CarnationPink  Approximate PANTONE 218
\def\cmag{\Magenta}	  % Magenta  Approximate PANTONE PROCESS-MAGENTA
\def\cvr{\VioletRed}	  % VioletRed  Approximate PANTONE 219
\def\parh{\Rhodamine}	  % Rhodamine  Approximate PANTONE RHODAMINE-RED
\def\cmu{\Mulberry}	  % Mulberry  Approximate PANTONE 241
\def\parv{\RedViolet}	  % RedViolet  Approximate PANTONE 234
\def\cfu{\Fuchsia}	  % Fuchsia  Approximate PANTONE 248
\def\cla{\Lavender}	  % Lavender  Approximate PANTONE 223
\def\cth{\Thistle}	  % Thistle  Approximate PANTONE 245
\def\corc{\Orchid}	  % Orchid  Approximate PANTONE 252
\def\cdo{\DarkOrchid}	  % DarkOrchid  No PANTONE match
\def\cpu{\Purple}	  % Purple  Approximate PANTONE PURPLE
\def\cpl{\Plum}		  % Plum  VERY-Approx PANTONE 518
\def\cvi{\Violet}	  % Violet  Approximate PANTONE VIOLET
\def\parp{\RoyalPurple}	  % RoyalPurple  Approximate PANTONE 267
\def\cbv{\BlueViolet}	  % BlueViolet  Approximate PANTONE 2755
\def\cpe{\Periwinkle}	  % Periwinkle  Approximate PANTONE 2715
\def\ccb{\CadetBlue}	  % CadetBlue  Approximate PANTONE (534+535)/2
\def\cco{\CornflowerBlue}  % CornflowerBlue  Approximate PANTONE 292
\def\cmb{\MidnightBlue}	  % MidnightBlue  Approximate PANTONE 302
\def\cnb{\NavyBlue}	  % NavyBlue  Approximate PANTONE 293
\def\crb{\RoyalBlue}	  % RoyalBlue  No PANTONE match
%\def\cbb{\Blue}		  % Blue  Approximate PANTONE BLUE-072
\def\cce{\Cerulean}	  % Cerulean  Approximate PANTONE 3005
\def\ccy{\Cyan}		  % Cyan  Approximate PANTONE PROCESS-CYAN
\def\cpb{\ProcessBlue}	  % ProcessBlue  Approximate PANTONE PROCESS-BLUE
\def\csb{\SkyBlue}	  % SkyBlue  Approximate PANTONE 2985
\def\ctu{\Turquoise}	  % Turquoise  Approximate PANTONE (312+313)/2
\def\ctb{\TealBlue}	  % TealBlue  Approximate PANTONE 3145
\def\caq{\Aquamarine}	  % Aquamarine  Approximate PANTONE 3135
\def\cbg{\BlueGreen}	  % BlueGreen  Approximate PANTONE 320
\def\cem{\Emerald}	  % Emerald  No PANTONE match
\def\cjg{\JungleGreen}	  % JungleGreen  Approximate PANTONE 328
\def\csg{\SeaGreen}	  % SeaGreen  Approximate PANTONE 3268
\def\cgg{\Green}	  % Green  VERY-Approx PANTONE GREEN
\def\cfg{\ForestGreen}	  % ForestGreen  Approximate PANTONE 349
\def\cpg{\PineGreen}	  % PineGreen  Approximate PANTONE 323
\def\clg{\LimeGreen}	  % LimeGreen  No PANTONE match
\def\cyg{\YellowGreen}	  % YellowGreen  Approximate PANTONE 375
\def\cspg{\SpringGreen}	  % SpringGreen  Approximate PANTONE 381
\def\cog{\OliveGreen}	  % OliveGreen  Approximate PANTONE 582
\def\pars{\RawSienna}	  % RawSienna  Approximate PANTONE 154
\def\cse{\Sepia}		  % Sepia  Approximate PANTONE 161
\def\cbr{\Brown}		  % Brown  Approximate PANTONE 1615
\def\cta{\Tan}		  % Tan  No PANTONE match
\def\cgr{\Gray}		  % Gray  Approximate PANTONE COOL-GRAY-8
\def\cbl{\Black}		  % Black  Approximate PANTONE PROCESS-BLACK
\def\cwh{\White}		  % White  No PANTONE match


\voffset=-.6in
\hoffset=-.5in
\hsize = 7.5 true in
\vsize=10.6 true in

%\voffset=1.2in
%\hoffset=-.5in
%\hsize = 10.2 true in
%\vsize=8 true in

\overfullrule=0pt


\def\ctln{\centerline}
\def\u{\underbar}
\def\ssk{\smallskip}
\def\msk{\medskip}
\def\bsk{\bigskip}
\def\hsk{\hskip.1in}
\def\hhsk{\hskip.2in}

\def\lra{$\Leftrightarrow$ }


\ctln{\bf Math 445 Number Theory}

\smallskip

\ctln{October 25, 2004}

\medskip

{\bf Continued fractions:} or, what happens when we ``re-interpret'' the Euclidean algorithm.

\ssk

To compute $(a,b)$, we write $a=bq_1+r_1$ , $b=r_1q_2+r_2$, and repeat; $r_i=r_{i+1}q_{i+2}+r_{i+2}$ , 
until $r_n=0$. Then $r_{n-1}=(a,b)$ . But if $(a,b)=1$ (so the last equation is $r_{n-2} = 1\cdot q_n+0$) and
we rewrite these calculations as

\ctln{$\displaystyle {{a}\over{b}} = q_1+{{r_1}\over{b}}$ , 
$\displaystyle {{b}\over{r_1}} = q_2+{{r_2}\over{r_1}}$  , $\ldots$ , 
$\displaystyle {{r_i}\over{r_{i+1}}} = q_{i+2}+{{r_{i+2}}\over{r_{i+1}}}$ , 
$\displaystyle {{r_{n-2}}\over{1}} = q_{n}+0$}

then we can use them to express $\displaystyle {{a}\over{b}}$ as a {\it continued fraction}:

\ssk

$\displaystyle {{a}\over{b}}$ = 
$\displaystyle q_1+{\displaystyle {r_1}\over{b}}$ = 
$\displaystyle q_1+{\displaystyle {1}\over{\displaystyle {b}\over{\displaystyle r_1}}}$ = 
$\displaystyle q_1+{\displaystyle {1}\over{\displaystyle q_2+{\displaystyle {r_2}\over{\displaystyle r_1}}}}$ = 
$\cdots$ = 
$\displaystyle q_1+{\displaystyle {1}\over{\displaystyle q_2+{\displaystyle {1}\over{q_3+{\displaystyle {1}\over{\displaystyle \cdots + {\displaystyle {1}\over{\displaystyle q_n}}}}}}}}$ 

\msk

For simplicity of notation, we will denote this continued fraction as $\left< q_1,q_2,\ldots, q_n\right>$ or $[q_1,q_2,\ldots, q_n]$ ,
depending on whether or not we want to use the same notation as the book, or as everybody else on the planet.
These continued fraction expansions are called {\it simple}, because the numerators are all 1, and the denomenators
are all positive integers. A more general theory need not require this.

\ssk

And there is no reason to limit this to rational numbers! If we use the Euclidean algorithm to ``compute''
the gcd of $x\in {\Bbb R}$ and 1, we would compute

\ssk

$x=1\cdot a_0 +r_0$ , i.e., $a_0=\lfloor x\rfloor$ , $r_0=x-a_0 = x-\lfloor x\rfloor$

$1=r_0a_1 + r_1$ , i.e., $\displaystyle {{1}\over{r_0}} = a_1 + {{r_1}\over{r_0}}$ 
with $a_1\in{\Bbb N}$ and $r_1<r_0$, i.e., 
$\displaystyle a_1 = \lfloor{{1}\over{r_0}}\rfloor$ , $\displaystyle r_1 = {{1}\over{r_0}} - \lfloor{{1}\over{r_0}}\rfloor$

and, in general, $\displaystyle a_i = \lfloor{{1}\over{r_{i-1}}}\rfloor$ , $\displaystyle r_i = {{1}\over{r_{i-1}}} - \lfloor{{1}\over{r_{i-1}}}\rfloor$

and we write $x=[a_0,a_1,\ldots ,a_{n-1},a_n+r_n] = [a_0,a_1,\ldots ,a_{n-1},a_n+\ldots]$. For irrational numbers $x$, the process will not terminate. The finite continued fractions $x_n=[a_0,a_1,\ldots ,a_{n-1},a_n]$ are called the {\it convergents} of $x$.

For example, if we apply this to $x=\sqrt{13}$, we find

\ssk

$a_0=\lfloor\sqrt{13}\rfloor = 3, r_0=\sqrt{13}-3$ , 
\hhsk
$\displaystyle a_1 = \lfloor{{1}\over{\sqrt{13}-3}}\rfloor = \lfloor {{\sqrt{13}+3}\over{4}}\rfloor = 1$ , 
$\displaystyle r_1 = {{\sqrt{13}+3}\over{4}} -1 = {{\sqrt{13}-1}\over{4}}$ , 
\hhsk
$\displaystyle a_2 = \lfloor{{4}\over{\sqrt{13}-1}}\rfloor = \lfloor {{\sqrt{13}+1}\over{3}}\rfloor = 1$ , 
$\displaystyle r_2 = {{\sqrt{13}+1}\over{3}} -1 = {{\sqrt{13}-2}\over{3}}$ , 
\hhsk
$\displaystyle a_2 = \lfloor{{3}\over{\sqrt{13}-2}}\rfloor = \lfloor {{\sqrt{13}+2}\over{3}}\rfloor = 1$ , 
$\displaystyle r_2 = {{\sqrt{13}+2}\over{3}} -1 = {{\sqrt{13}-1}\over{3}}$ , 
\hhsk
$\displaystyle a_3 = \lfloor{{3}\over{\sqrt{13}-1}}\rfloor = \lfloor {{\sqrt{13}+1}\over{4}}\rfloor = 1$ , 
$\displaystyle r_3 = {{\sqrt{13}+1}\over{4}} -1 = {{\sqrt{13}-3}\over{4}}$ , 
\hhsk
$\displaystyle a_4 = \lfloor{{4}\over{\sqrt{13}-3}}\rfloor = \lfloor {{\sqrt{13}+3}\over{1}}\rfloor = 6$ , 
$\displaystyle r_4 = {{\sqrt{13}+3}\over{1}} -6 = {{\sqrt{13}-3}\over{1}}$  = $r_0$ , 

and then the process will repeat.
\hhsk
So, $\sqrt{13} = [3,1,1,1,1,6,1,1,1,1,6,\ldots]$ = $[3,\overline{1,1,1,1,6}]$ .

\vfill\end



$\displaystyle \sum_{n=1}^{\infty} $

\Big({{}\over{}}\Big)


\cfrac q_1+{{1}\over{{q_2+{{1}\over{{q_3+ {{1}\over{{\cdots +{{1}\over{q_n}}}}}}}}}}}}}\endcfrac

+\cfrac{1}{q_3+ \cfrac{1}{\cdots +\cfrac{1}{q_n}}}}}}}}
