1

Prove that negative Pell's equation $$x^2-Dy^2=-1$$ has no solutions if the period length of continued fraction of $\sqrt{D}$ is even and has infinitely many solutions if the length is odd. I feel if the length is odd then the solution might have something to do with the convergent of $\sqrt{D}$. Any further hints?

Robin
  • 3,227

1 Answers1

0

This post shows that if there is at least one solution, there are infinitely many solutions.

Let $\sqrt{d} = [a_0, \overline{a_1, \dots, a_n}] = [a_0, \theta_1]$, where $\theta_1 = [\overline{a_1, \dots, a_n}]$.

I'll do the case $n$ is odd, I'm unaware of how to do the even case. I've asked it as a question here.

Then $\sqrt{d} = [a_0, a_1, \dots, a_n, \overline{a_1, \dots, a_n}] = [a_0, \dots, a_n, \theta_1] = \frac{p_n \theta_1 + p_{n-1}}{q_n \theta_1 + p_{n-1}}$, where $\theta_1 = \frac{1}{\sqrt{d} - a_0}$.

Hence $\sqrt{d} = \frac{p_n + p_{n-1}(\sqrt{d}-a_0)}{q_n + q_{n-1} (\sqrt{d}-a_0)}$. Thus $d q_{n-1} + (q_n - a_0 q_{n-1}) \sqrt{d} = (p_n - p_{n-1} a_0) + p_{n-1} \sqrt{d}$.

Equate $\sqrt{d}$ and rational parts: $d q_{n-1} = p_n - p_{n-1} q_0$, $p_{n-1} = q_n - a_0 q_{n-1}$.

$p_{n-1}^2 - d q_{n-1}^2 = p_{n-1}(q_n - a_0 q_{n-1}) - p_n q_{n-1} + p_{n-1} q_{n-1} a_0 = p_{n-1} q_{n} - p_n q_{n-1} = (-1)^n$.

If $n$ is odd, then $p^2_{n-1} - d q_{n-1}^2 = -1$, and we've found a solution. Hence we have infinitely many solutions.

Robin
  • 3,227