# Integer Polynomial Perfect Square Question

Let $$f(x)\in \mathbb{Z}[x] - \mathbb{Z}$$ with all roots distinct in $$\mathbb{C}$$. I need to show that for infinitely many $$n\in\mathbb{Z}$$ we have $$f(n)$$ is not a perfect square. Any help would be greatly appreciated :)

• I don't know if this will work, but if $r$ is a quadratic residue mod $m$ and you find one solution to $f(n) \equiv r \pmod{m}$ then all $r+km$ satisfy your condition. – B. Goddard Nov 29 '19 at 11:51

Consider the polynomial $$F(x,y)=y^2-f(x)$$. It is obviously irreducible since $$f$$ is square-free in $$\mathbb{Q}[x,y]$$ and thus we can apply Hilbert's Irreducibility Theorem to obtain an infinitude of $$x_i$$ such that $$y^2-f(x_i)=0$$ is irreducible or equivalently $$f(x_i)\ne{}n^2,\forall{}n\in\mathbb{N}$$. This means that the infinite $$f(x_i)$$ we found are not perfect squares.
According to this https://mathoverflow.net/q/224881 it is a "well-known" fact that if $$f(n)$$ is a perfect square for every integer $$n$$, then $$f(x)$$ is a perfect square (as a polynomial.) Since the roots of your polynomial are distinct, it can't be a perfect square, so there exists an integer $$m$$ such that $$f(m) = b$$ is not a perfect square.
Then, according to this https://math.stackexchange.com/a/646135/362009 there exists a prime $$p$$ for which $$b$$ is a quadratic non-residue. Then for any integer $$k$$ we have $$f(m+kp) \equiv f(m) \equiv b \pmod{p}$$ and so we have infinitely many integers for which $$f(n)$$ can't be a square.