Show that $x^{2}-6y^{2}=523$ has infinitely many integral solutions I want to show that $x^2-6y^2=523$  has infinitely many solutions. For the special case $x^2-dy^2=1$, I know what I need to do. I can get the result by using continued fractions. Also, in the kinds of $x^2-dy^2=m$ for some examples, I can say that there is no solution using modulo prime $p$. But in general, I'm not sure how to find the solution set for $ax^{2}+by^{2}+c=0$ where $a,b,c\in \mathbf{Z}$.
I would appreciate if you can help me with this question or direct it to a resource that can help.
 A: You can use a twist on Pell's equation in this case. The fundamental Pell solution for $D=6$ is $(x,y)=(5,2).$ So all positive solutions to $$a^2-6b^2=1$$ are given by $$a_k+b_k \sqrt{6}=(5+2\sqrt{6})^k$$ for $k\in \mathbb{Z}_{+}.$ Here's the fun part: since $(x,y)=(23,1)$ is a solution to $$x^2-6y^2 = 523$$ (found by trying out smaller values of $x$ or $y$ and seeing if the other variable turns out to be an integer), a solution is given by $$x_k + y_k\sqrt{6}=(23+\sqrt{6})(a_k+b_k \sqrt{6})$$ for each positive integer $k.$ It is easy to prove that these are all solutions because if $a^2-6b^2=1$ then
$$(23+\sqrt{6})(a+b\sqrt{6}) = (23a+6b)+(23b+a)\sqrt{6}$$
and
\begin{align*}
(23a+6b)^2-6(23b+a)^2 &= 23^2 (a^2-6b^2) - 6(a^2-6b^2)\\
&= 23^2-6\\
&=523.
\end{align*}
This does not necessarily find all solutions, but you do get infinitely many since they are monotonically increasing in some sense. You can read what Keith Conrad has written about finding all solutions.
A: $(23, 1)$ is a solution.
If $(x, y)$ is a solution, then $(5x + 12y, 2x + 5y)$ is also a solution.
