# Direct proof that for a prime $p$ if $p\equiv 1 \bmod 4$ then $l(\sqrt{p})$ is odd.

Definition: Assume $p$ is a prime. $l(\sqrt{p})=$ length of period in simple continued fraction expansion of $\sqrt{p}$.

The standard proof of this uses the following:

1. $p$ is a prime implies $p \equiv 1 \bmod 4$ iff $x^2-py^2=-1$ has integer solutions.
2. $p$ is a prime implies $x^2-py^2=-1$ has integer solutions iff $l(\sqrt{p})$ is odd.

I have proofs of (1) and (2) so that I have a proof of the stated question. What I would like is a proof that does not use any equivalences. That is,

Assume $p \equiv 1 \bmod 4$. Show that $l(\sqrt{p})$ is odd.

I will accept contradiction or contrapositive as well. I know this may seem strange but I think there is a lot to learn from this proof.

Also, I asked this on mathoverflow link but got no definative answer. I think a proof may exist using Farey graphs and/or Ford Circles.

-
Oops. I think I messed up the title in my edit. Sorry about that. –  user2468 Mar 2 '12 at 1:33
add comment