
\input amstex


\magnification=1400


\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\dsl{\displaystyle}
\def\hskp{\hskip1.5in}

\def\lra{$\Leftrightarrow$ }


\ctln{\bf Math 445 Number Theory}

\ssk

\ctln{November 12, 2004}

\msk

Our basic result: \hhsk if $\sqrt{n} = [\lfloor \sqrt{n}\rfloor, \overline{a_1,\ldots, a_{m-1},2\lfloor \sqrt{n}\rfloor}]$,
with period of length $m$, then if $\dsl \sqrt{n} = [a_0,\ldots,a_s,{{\sqrt{n}+m_s}\over{q_{s+1}}}]$, then 
$h_s^2-nk_s^2=(-1)^{s-1}q_{s+1}$ . In particular, since $1=q_m=q_{2m}=\ldots$ , we have 
$h_{mt-1}^2-nk_{mt-1}^2 = (-1)^{mt-2} = (-1)^{mt}$ . So if $m$ is even, we find solutions for $x^2-ny^2=1$
with every turn through the period; if $m$ is odd, we find solutions with every two turns (and solutions
to $x^2-ny^2=-1$ for the alternate turns).

\msk

For example: $x^2-11y^2=N$  .

\ssk

$3<\sqrt{11} < 4$ , so $a_0=3$ , $x_0=\sqrt{11}-3$ ; \hhsk
$\dsl \zeta_1 = {{\sqrt{11}+3}\over{2}}$ , $a_1=3$ , $\dsl x_1={{\sqrt{11}-3}\over{2}}$ ;
$\dsl \zeta_2 = {{\sqrt{11}+3}\over{1}}$ , $a_2=6$ , $\dsl x_2={{\sqrt{11}-3}\over{1}}$ ;

\ssk

and so $\sqrt{11}=[3,\overline{3,6}]$ , and $q_0=1$ , $q_1=-2$ , $q_2=1$ , $q_3=-2$ , etc.

Since the length of the period of the continued fraction of $\sqrt{11}$ , $2$, is even, after
the first trip through the repeating part, $h_1^2-11k_1^2 = 10^2-11\cdot 3^2 = (-1)^0q_2 = 1$ . Also,
since the only numbers occuring as $(-1)^{s-1}q_{s+1}$ are $-2$ and $1$, the only 
$N$ with $|N|\leq \sqrt{11}$ for which $x^2-11y^2=N$ has solutions are $N=-2,1$ and $4$
(since $4$ is a perfect square). So, e.g., $x^2-11y^2=3$ has no solutions with $x,y\in{\Bbb Z}$ .

On the other hand, $x^2\equiv 3\pmod{11}$ \underbar{does} have solutions, since we
can compute (as we have before) that $\dsl \Big({{3}\over{11}}\Big) = 1$. So $x^2-11y=3$
does have solutions with $x,y\in{\Bbb Z}$ .

\msk

Since we know that, if $n$ is not a perfect square, $x^2-ny_2=1$ has inifinitely many solutions
with $x,y\in{\Bbb Z}$, the equation \hhsk 
$(x^2-ny^2)(a^2-nb^2) = (xa\pm nyb)^2-n(xb\pm ya)^2$ 
\hhsk 
shows that if $a^2-nb^2=N$ has a
solution, then it in fact has infinitely many solutions. By choosing a solution to $x^2-ny_2=1$
with $x$ and $y$ large, we can build a solution to $a^2-nb^2=N$ with $a$ and $b$ as large
as we like.

\ssk

There is an alternative approach to generating solutions to $a^2-nb^2=N$: if we have
that $a^2-nb^2=N$ and $x^2-ny^2=1$, then, for any $m$,

\ssk

\ctln{$(a^2-nb^2)(x^2-ny^2)^m=N = (a-\sqrt{n}b)(x-\sqrt{n}y)^m
(a+\sqrt{n}b)(x+\sqrt{n}y)^m$}

But we can, by collecting terms, write $(a-\sqrt{n}b)(x-\sqrt{n}y)^m = A-\sqrt{n}B$ for some $A,B\in{\Bbb Z}$; then
$(a+\sqrt{n}b)(x+\sqrt{n}y)^m = A+\sqrt{n}B$,  because the product of 
the {\it rational conjugates} of two quadratic irrationals is the conjugate of their product (just
like complex conjuagtion). So
$(A-\sqrt{n}B)(A+\sqrt{n}B) = A^2-nB^2 = N$  gives another solution to the same Pell equation.


\vfill\end
