Suppose n is a fixed integer not equal to 0 and d is a positive integer not a perfect square, and suppose

$\displaystyle x_0^2 - dy_0^2 = n$,

where $\displaystyle x_0 \geq 0,\ y_0 \geq 0$. Let $\displaystyle x_1 = ax_0 + bdy_0,\ y_1 = bx_0 + ay_0$, where a>0, b>0 provides a solution to the Fermat-Pell equation, $\displaystyle a^2 - db^2 = 1$. Show that

$\displaystyle x_1^2 - dy_1^2 = n,\ \ \ \ \ x_1 > x_0 \geq 0,\ \ \ \ \ y_1 > y_0 \geq 0$.

Conclude that the equation $\displaystyle x^2 - dy^2 = n$ either has no solutions or infinitely many solutions.

********************

I do know that the problem is similar to http://www.mathhelpforum.com/math-he...od-ascent.html, but I did not understand something in that thread. How did TPH go from $\displaystyle x^2 - 3y^2 = 1$ to

Is there a method to that or is it just something you recognize as the right formula to use?