<s>[INST] Infinite solutions of Pell's equation $x^{2} - dy^{2} = 1$ 
Let $d > 1$ be a squarefree integer. Prove that the equation $x^{2} - dy^{2} = 1$ has infinitely many solutions in $\mathbb{Z} \times \mathbb{Z}$.

What I have done: let $ \ \mathbb{K} = \mathbb{Q}[\sqrt{d}]$. If $ d \not\equiv 1$ mod $4$, then $O_{\mathbb{K}} = \mathbb{Z}[\sqrt{d}]$ and the statement follows by the Dirichlet Unit Theorem. What about the case $ d \equiv 1 $ mod $4$ ?
 [/INST] If x solves $x^2-4 = dy^2$ then so does $x^2-2$
Put $(x^2-2)^2 = x^2 - 4x + 4$ , which is $d(xy)^2 + 4$
Dividing $x$, $y$ by $2$ will give this equation in units.
Now, if $x'$ and $x''$ are consecutive solutions, then $x x'' - x'$ is also a solution.  Put 
Since we have $2$ and $x$ gives $x^2-2$, it then follows that $x_{n+1} = x x_n - x_{n-1}$ os also a solution, by
$x_{n+1} + x_{n-1} = x x_n$
One shows that by this rather exotic arrangement, that if two values solve this equation, then the third one does also, and thus that this series is recursive over powers of $x$.
Suppose $a, b, c, d$ form a series such that $xb = a+c$.  Then the measure $b^2 - ac$ is a constant, since $d = xc-b$.  
Now, $c^2 - bd = c^2 - xcb + b^2  = (c-xb)c + b^2 = b^2-ac$
Thus, if eg $2, x, x-2, x^3-3x$ form such a series based on this solution
</s>