\documentclass[a4paper,12pt]{article}

\begin{document}

\parindent=0pt

\begin{center}

CONTINUED FRACTIONS

SYMMETRIC CONTINUED FRACTIONS

\end{center}

%page 15


Let $[a_0,\ldots,a_n]=\frac{p_n}{q_n}$

Then

\begin{eqnarray*}
p_n&=&a_np_{n-1}+p_{n-1}\ 0<p_{n-2}<p_{n-1}\\
p_{n-1}&=&a_{n-1}p_{n-2}+p_{n-3}\ 0<p_{n-1}<p_{n-2}\\ \vdots&&\\
p_2&=&a_2p_1+p_0\\ p_1&=&a_1p_0+1\ (p_0=a_0)\\ p_0&=&a_0.1
\end{eqnarray*}


This is the Euclidean algorithm for $(p_n,p_{n-1})$

So $\frac{p_n}{p_n-1}=[a_n,\ldots,a_o]$- the reverse of
$\frac{p_n}{q_n}$

Also

\begin{eqnarray*}
q_n&=&a_nq_{n-1}+q_{n-2}\\ q_{n-1}&=&a_{n-1}q_{n-2}+q_{n-3}\\
\vdots&&\\ q_2&=&a_2q_1+1\ q_0=1\\ q_1&=&a_1.1
\end{eqnarray*}

Again this is the Euclidean Algorithm so
$\frac{q_n}{q_{n-1}}=[a_n,\ldots,a_1]$

Now suppose we have a symmetric continuous function
$[a_0,a_1,a_2,\ldots,a_2,a_1,a_0]$

what can we say about the rational it gives rise to.

Theorem

A necessary and sufficient condition that an irreducible rational
$\frac{P}{Q}\ (P>Q>1)$ should have a symmetric continued function
with an even number of $a_i$'s is that $Q^2+1$ should be divisible
by $P$.

A necessary and sufficient condition that an irreducible rational
$\frac{P}{Q}\ (P>Q>1)$ should have a symmetric continued function
with an odd number of $a_i$'s is that $Q^2-1$ should be divisible
by $P$.

%page 16

Proof

Necessity

Suppose $\frac{P}{Q}=[a_0,a_1,\ldots a_1,a_0]=\frac{p_n}{q_n}$
with $n+1$ entries. Since $(P,Q)=1,\ P=p_n$ and $Q=q_n$. Because
of symmetry

$$\frac{p_n}{q_n}=\frac{p_n}{p_{n-1}},$$

so $q_n=p_{n-1}$.

From the equation $p_nq_{n-1}-p_{n-1}q_n=(-1)^{n-1}$ we have

$$Pq_{n-1}-(q_n)^2=(-1)^{n-1}$$

$$P.q_{n-1}=Q^2+)(-1)^{n-1}$$

so $Q^2+(-1)^{n-1}$ is divisible by $P$.

Sufficiency

Suppose $Q^2+\varepsilon=PQ'\ \varepsilon=\pm1\ Q'\in N$

Expand $\frac{P}{Q}$ as a continued fraction

$$\frac{P}{Q}=[a_0,\ldots,a_n]=\frac{p_n}{q_n}$$

where $n$ is chosen so that $(-1)^{n-1}=\varepsilon$. This is
possible because of the ambiguity at the end of a finite continued
fraction. Now $(P,Q)=1$ so $P=p_n\ Q=q_n$ and so
$q_n^2+\varepsilon=p_nQ'$ also $q_np_{n-1}+(-1)^{n-1}=p_nq_{n-1}$

Subtracting gives $q_n(q_n-p_{n-1})=p_n(Q'-q_{n-1})$

Hence $q_n-p_{n-1}$ is divisible by $p_n$ since $(p_n,q_n)=1$.

But $p_n>q_n>0$ and $p_n>p_{n-1}>0$

so $p_n>|q_n-p_{n-1}|$

So, since $p_n|q_n-p_{n-1},\ q_n-p_{n-1}=0$

so $\frac{p_n}{q_n}=[a_0,\ldots a_n]=\frac{p_n}{p_{n-1}}$

but $\frac{p_n}{p_{n-1}}=[a_n,\ldots,a_0]$. So the continued
fraction is symmetric.


\end{document}
