%p24S.tex: 
%begin macros
\baselineskip=14pt
\parskip=10pt
\magnification=\magstephalf
\parindent=0pt
\overfullrule=0in
\def\frac#1#2{{#1 \over #2}}
\def\g{\bigtriangledown}
\def\S{\cal S}
\nopagenumbers
%end macros
 

\centerline
{
\bf Solutions t tendance Quiz \# 24 for Dr. Z.'s Number Theory
Course for Dec. 5, 2013
}

\bigskip

{\bf 1.} Convert  the $\frac{27}{23}$ into a simple continued fraction.

{\bf Sol.}:
$$
\frac{27}{23}= 1 + \frac{4}{23}= 1+ \frac{1}{\frac{23}{4}} \quad ,
$$
$$
\frac{23}{4}= 5 + \frac{3}{4}=  5 + \frac{1}{\frac{4}{3}} \quad
$$
$$
\frac{4}{3}=1+\frac{1}{3} \quad .
$$
Now it is time to go to the {\bf back journey}
$$
\frac{23}{4}= 5 + \frac{3}{4}=  5 + \frac{1}{1+\frac{1}{3}} \quad ,
$$
$$
\frac{27}{23}= 1 + \frac{4}{23}= 1+ \frac{1}{ 5 + \frac{1}{1+\frac{1}{3}}} \quad .
$$
This is the answer. In compact (one-line) notation it is $[1,5,1,3]$.

{\bf 2.} Find a representation in the form $a+b\sqrt{Q}$ for rational numbers $a$ and $b$ and positive integer $Q$, for
the following infinite, ultimately periodic, continued fractions $x$.
$$
x=[3,1,2,1,2,1,2,1,2, \dots \quad ] \quad,
$$
where $1,2$ repeat for ever.

{\bf Sol. to 2}:
Let's call The periodic part $y$:
$$
y=[1,2,1,2,1,2,1,2, \dots \quad ]  \quad
$$
We have
$$
y=[1,2,y]  \quad .
$$
Spelling out the right side, we have
$$
y=1+ \frac{1}{2+\frac{1}{y}}=1+ \frac{1}{\frac{2y+1}{y}}=
1+ \frac{y}{2y+1}= \frac{3y+1}{2y+1} \quad .
$$
So we have to solve
$$
y= \frac{3y+1}{2y+1} \quad .
$$
This means
$$
y - \frac{3y+1}{2y+1}= 0 \quad
$$
Simplifying
$$
y(2y+1)-(3y+1)=0 \quad ,
$$
$$
2y^2-2y-1=0 \quad .
$$
Using the quadratic formula
$$
y= \frac{-(-2) \pm \sqrt{(-2)^2-4(2)(-1)}}{2 \cdot 2}=
\frac{2 \pm \sqrt{12}}{4}=\frac{2 \pm 2 \sqrt{3}}{4}=\frac{1 \pm  \sqrt{3}}{2} \quad .
$$
But $y$ is obviously positive, so
$$
y= \frac{1+ \sqrt{3}}{2} \quad .
$$
Now it is time to find $x$.
We have
$$
x=[3,y] = 3 + \frac{1}{y}=3 + \frac{2}{1+\sqrt{3}}
=
3 + \frac{2(\sqrt{3}-1)}{(\sqrt{3}+1)(\sqrt{3}-1)}
=3 + \frac{2(\sqrt{3}-1)}{\sqrt{3}^2-1}
$$
$$
=3 + \frac{2(\sqrt{3}-1)}{2}
=3 + \sqrt{3}-1= 2 + \sqrt{3} 
$$

{\bf Ans. to 2}: $x=2+ \sqrt{3}$.

\end




