Integer solution to a square root equation Given the following function: $$f(x) = \sqrt{36 x^2+16416 x +61084}$$ where x is an integer and the function also generates an integer value, is there an algorithm to determine its integer solutions?
 A: You can write
$f(x) = \sqrt{(6(x-228))^2 - 1810340}$.
Now, $f(x)$ is an integer if and only if $(6(x-228))^2 - 1810340$ is a square.
Write $$k^2=(6(x-228))^2 - 1810340$$
so
$$1810340 = (6(x-228))^2 - k^2 = (6x-6*228+k)(6x-6*228-k)$$
Now you factorize $1810340 = 2^2 * 5* 7* 67* 193$.
So you have to solve $48$ linear systems of the form
$$
\left\{
\begin{matrix}
6x-6*228&+k &=& a \\
6x-6*228&-k &=& b
\end{matrix}
\right.
$$
For all possible values of $ab = 1810340$.
A: Given
$$
f(x) = \sqrt{ 36 x^2 + 16416 x + 61084}.
$$
For what integer $x$ is $f(x)$ also an integer?

We can write
$$
f(x) = \sqrt{ \Big( 6 x + 1368 \Big)^2 - 1810340 },
$$
therefore
$$
\Big( 6 x + 1368 \Big)^2 - 1810340 = \Big( 6 x + 1368 - p \Big)^2,
$$
so
$$
p \left\{  2  \Big( 6 x + 1368 \Big) - p \right\} = 1810340.
$$
Thus
$$
x = \left( \left( \frac{1810340}{p} + p \right) \Big/ 2 - 1368 \right) \Big/ 6.
$$
Note the symmetry
$$
\frac{1810340}{p} + p = \frac{1810340}{1810340/p} + 1810340/p.
$$
Using
$$
1810340 = 2^2 \times 5 \times 7 \times 67 \times 193,
$$
we can use limited values for $p$, like $p=2 \times 5 \times 7$, which is equivalent with $p= 2 \times 67 \times 193$.
We obtain the following results:
$$
\begin{array}{ccccc|c|c}
2 & 5 & 7 & 67 & 193 & p & x\\
\hline
\times &&&&& 2 &75203\\
\times & \times &&&& 10 &14859\\
\times && \times &&& 14 &10549\\
\times & \times & \times &&& 70 &1933\\
\times &&& \times && 134 &909\\
\times &&&& \times & 386 &195\\
\times & \times && \times && 670 &53\\
\times & \times &&& \times & 1930 &11\\
\end{array}
$$
