To prove that this expression actually makes sense and equals a finite number
is beyond the scope of this worksheet, so we assume it for now.
This is denoted $[a_0, a_1, a_2, ...]$.
\problem{}<irrational>
Using a calculator, compute the first five terms of the
continued fraction expansion of the following numbers.
Do you see any patterns?
\begin{itemize}
\item$\sqrt{2}$
\item$\pi\approx3.14159...$
\item$\sqrt{5}$
\item$e \approx2.71828...$
\end{itemize}
\vfill
\problem{}
Show that an $\alpha\in\mathbb{R}^+$ can be written as a finite
continued fraction if and only if $\alpha$ is rational. \par
\hint{For one of the directions, use \ref{euclid}}
\vfill
\pagebreak
\definition{}
The continued fraction $[a_0, a_1, a_2, ...]$ is \textit{periodic} if it ends in a repeating sequence of digits. \par
A few examples are below. We denote the repeating sequence with a line.
\begin{itemize}
\item$[1,2,2,2,...]=[1, \overline{2}]$ is periodic.
\item$[1,2,3,4,5,...]$ is not periodic.
\item$[1,3,7,6,4,3,4,3,4,3,...]=[1,3,7,6,\overline{4,3}]$ is periodic.
\item$[1,2,4,8,16, ...]$ is not periodic.
\end{itemize}
\problem{}
\begin{itemize}
\item Show that $\sqrt{2}=[1, \overline{2}]$.
\item Show that $\sqrt{5}=[1, \overline{4}]$.
\end{itemize}
\hint{use the same strategy as \ref{irrational} but without a calculator.}
\vfill
\problem{Challenge I}
Express the following continued fractions in the form $\frac{a+\sqrt{b}}{c}$ where $a$, $b$, and $c$ are integers: \par
\begin{itemize}
\item$[~\overline{1}~]$
\item$[~\overline{2,5}~]$
\item$[~1, 3, \overline{2,3}~]$
\end{itemize}
\vfill
\problem{Challenge II}
Let $\alpha=[~a_0,~ ...,~ a_r,~ \overline{a_{r+1},~ ...,~ a_{r+p}}~]$ be any periodic continued fraction. \par
Prove that $\alpha$ is of the form $\frac{a+\sqrt{b}}{c}$ for some integers $a,b,c$ where $b$ is not a perfect square.
\vfill
\problem{Challenge III}
Prove that any number of the form $\frac{a+\sqrt{b}}{c}$ where $a,b,c$ are integers
and $b$ is not a perfect square can be written as a periodic continued fraction.
%\begin{rmk}
%Numbers of the form $\frac{a+\sqrt{b}}{c}$ where $a,b,c$ are integers and $b$ is not a perfect square are the ``simplest'' irrational numbers in the following sense. A number is rational if and only if it is the solution to a degree $1$ polynomial equation, $ax+b = 0$. Similarly, a number is of the form $\frac{a+\sqrt{b}}{c}$ if it is the solution to a degree $2$ polynomial equation, $ax^2 + bx + c = 0$ (Bonus exercise: prove this). Such numbers are called \textit{quadratic} irrational numbers or \textit{degree 2} irrational numbers.
%\end{rmk}
%\begin{rmk}
%Notice that the results of this worksheet provide a very clean characterization of continued fraction expansions:
%\begin{itemize}
%\item $\alpha$ is a rational number if and only if it has a finite continued fraction expansion.
%\item $\alpha$ is a degree $2$ irrational number if and only if it has an infinite periodic continued fraction expansion.