Congruent solution implies an integer solution. Let us consider a polynomial $p\in \mathbb{Q}[x]$ with $p(\mathbb{Z})\subseteq \mathbb{Z}$, such that for each $a\in \mathbb{N},\,p(n)\equiv 0 \,(\text{ mod } a\,) $ has a solution for some $n\in \mathbb{Z}.$
Does this imply $p(n)=0$ for some $n\in \mathbb{Z}$ ?
Thanks in advance for any help.
 A: I claim that $f(x) = (x^3-3)(x^2-2)(x^2+2)(x^2+1)$ is a counterexample: for any nonzero integer $a$, we have $a \mid f(n)$ for some $n \in \mathbb{Z}$.  However, it is clear that $f(n) \ne 0$ for all $n \in \mathbb{Z}$.
First, by the Chinese Remainder Theorem, it suffices to prove this in cases where $a$ is a prime power.  Now, if $a = p$ is an odd prime, then at least one of $-1, 2, -2$ must be a quadratic residue $\pmod{p}$ since $-2 = (-1) \cdot 2$.  Then, for example, if $n^2 \equiv -2 \pmod{p}$, then $p \mid n^2+2$ so $p \mid f(n)$; and similarly for the other cases.  Now for example if $n^2 + 2 \equiv 0 \pmod{p}$, then in particular since $p$ is odd we have $2n \not\equiv 0 \pmod{p}$; therefore, by Hensel's lemma, for each $m > 0$ that implies that there exists $n' \equiv n \pmod{p}$ such that $(n')^2 + 2 \equiv 0 \pmod{p^m}$.  This proves what we wanted in cases where $a$ is an odd prime power.
All that remains is to show the case $a = 2^m$.  However, here the $x^3-3$ factor comes into play: set $g(x) = x^3 - 3$.  Then since $g(1) = -2 \equiv 0 \pmod{2}$ and $g'(1) = 3 \not\equiv 0 \pmod{2}$, again by Hensel's lemma we get that for each $m$, there exists $n' \equiv 1 \pmod{2}$ such that $g(n') \equiv 0 \pmod{2^m}$, finishing the proof.
