Isn't this claim about continued fractions false?

119 Views Asked by At

Here is a link to Wikipedia's entry on Continued fraction.

I found the following claim about Pell's equation:

Pell's equation

Continued fractions play an essential role in the solution of Pell's equation. For example, for positive integers $p$ and $q,$ and non-square $n,$ it is true that $p^2 − nq^2 = \pm 1\;$ if and only if $\;\dfrac pq$ is a convergent of the regular continued fraction for $\sqrt n$.

Question:

Isn't this claim false? For example, $\dfrac{39}{5}$ is a convergent of the regular continued fraction of $\sqrt{61};$ however, $39^2-5^2\cdot 61=-4\ne\pm1$.