how would I find integer solutions for $y^2 = mx + b$? For example;  $$y^2 = 30x + 1$$
For which one answer is; $$11^2 = 30(4) + 1 = 121$$
WA kindly gave me 4 answers;
$$x = 2 (15 n^2 - 29 n + 14), y = 29 - 30 n, n \in Z$$
$$x = 2 (15 n^2 - 19 n + 6), y = 19 - 30 n, n \in Z$$
$$x = 2 (15 n^2 - 11 n + 2), y = 11 - 30 n, n \in Z$$
$$x = 2 (15 n^2 - n), y = 1 - 30 n, n \in Z$$
Please help me learn how to get from my example to those 4 answers.
I'm more interested in a general solution in terms of $m$ and $b$. $30$ and $1$ are just random, convenient values for example. Though, I can work backward from example values to the general solution.
I recognize the two coefficients of $n$ being $1$ and $29$ are trivially $b$ and $m-b$, respectively.
I'm particularly interested in whether there's an algebraic calculation that yields the coefficients of $11$ and $19$, or whether it's a search function. I.e., what if $m$ were very large?
 A: Notice that your equation yields $$x=\frac{y^2-1}{30}\implies y^2\equiv1\bmod 30\iff (y+1)(y-1)\equiv 0\bmod 30$$ It is simple to infer that $y\bmod 30\in\{\pm1, \pm11\} $. If $y=30k+1\;, k\in\mathbb Z $ then $$x=30k^2-2k$$ Therefore, $(x,y)=(30k^2-2k, 30k+1)$ for every $k\in\mathbb Z$ are all the solutions when $y\equiv 1\bmod 30$. Can you work out the other three cases?
A: $y^2 = mx +b$ so $x=\frac {y^2-b}m$ needs to be an integer.
I don't know of any general way to do it but you could solve $y^2 = b\pmod m$ (which may or may not have tricks; but brute force we can test $m$ values).  $\alpha$ is a such a solution then $\alpha + mk$ will be solutions.
For example for $y^2 = 6m + 7$ we must have $y^2 \equiv 7\equiv 1\pmod 6$ and and so $y^2-1\equiv (y-1)(y+1)\equiv 0\pmod 6$ so $y\equiv 1, -1$ and $y-1\equiv 2,3$ while $y+1\equiv 3,2$ but the latter are impossible so $y=6k\pm 1$ will be a solution.
Less neat example $y^2 = 7m + 12$ we must have $y^2 \equiv 12\equiv 5\pmod 7$.  Brute force $0^2,(\pm1)^2,(\pm 2)^2,(\pm 3)^2\equiv 0,1,4,2$ so that has no solutions.  But for $y^2 = 7m + 11$ we'd have $y=7m \pm 2$ always a solution.
Verification $(7m\pm 2)^2 = 49m^2 \pm 28m + 4= 7(7m^2 \pm 4m-1) + 11$.  So $x=7m^2\pm 4m-1; y=7m\pm 2$ is a solution to $y^2 = 7x +11$
And for $k=0....6$ $(7m+k)^2 = 49m^2 +14mk + k^2 = 7(7m^2+2mk) +k^2$ but for $k^2\ne 7j + 12$ for any $j$ so there are no integer solutions to $y^2=7x + 12$.
