About form $ax^2+bx+c$ always representing a perfect square number [duplicate]
This is a special case of Hilbert's irreducibility theorem, as noted explicitly in Wikipedia's article on that theorem. Specializing the proof yields the following argument, for which it is enough to assume that $f(x)$ takes square values for a few sufficiently large consecutive integer values of $x$.
For integers $n$, let $g_n = \sqrt{f(n)}$. By hypothesis each $g_n$ is an integer. On the other hand, there is some constant $C$ such that the second finite difference $d_n := g_{n+2} - 2 g_{n+1} + g_n$ satisfies $|d_n| < C/n$ for large $n$. (This can be seen in several ways, e.g. by applying Rolle's theorem twice, or by expanding $d_n$ in a Laurent series about $n = \infty$.) Since $d_n$ is an integer, it follows that $d_n = 0$ for large $n$, say $n>N_0$. But this means that $g_n$ is eventually linear: there exist integers $A,B$ such that $g_n = An+B$ for all $n > N_0$. Then $f(n) = (An+B)^2$ for all $n > N_0$, which makes $f(x) = (Ax+B)^2$ identically, QED.