Question: Find all integer values of $x$ such that $x^2 + 13x + 3$ is a perfect integer square.
What I have attempted;
For $x^2 + 13x + 3$ to be a perfect integer square let it equal $k^2$ where $k \in \mathbb{Z} $
Hence $$x^2 + 13x + 3 = k^2$$
$$ \Leftrightarrow x^2 + 13x + (3-k^2)=0$$
$$ \Leftrightarrow x={-b\pm\sqrt{b^2-4ac} \over 2a} $$
$$ \Leftrightarrow x={-13\pm\sqrt{13^2-4(1)(3-k^2)} \over 2(1)}$$
$$ \Leftrightarrow x={-13\pm\sqrt{169-12+4k^2} \over 2}$$
$$ \Leftrightarrow x={-13\pm\sqrt{157+4k^2} \over 2}$$
We also want $157+4k^2$ to be a perfect square hence
$$ 157 + 4k^2 = n^2 $$
$$ n^2 -4k^2 = 157 $$
$$ (n-2k)(n+2k) = 157 $$
What should I do now?
I have looked at this; Find all integers $x$ such that $x^2+3x+24$ is a perfect square.
but I am confused what I should do to continue..
Observe that $x^2+13x+3=(x+\frac{13}{2})^2-\frac{157}{4}$
As you have assumed, let $(x+\frac{13}{2})^2-\frac{157}{4}=k^2$
Hence, by simplifying, we get that $(2x+13)^2-157=4k^2$
Further simplifying by factorisation yields $(2x+13-2k)(2x+13+2k)=157=157\cdot 1$
So, there are only two possibilities:
The first one yields $k=-39$ and the second one yields $k=39$.
Can you find $x$ now??