TITLE: A polynomial with prime values at $2n+1$ integers is irreducible
QUESTION [5 upvotes]: Suppose $f(x)$ is a polynomial with integer coefficients and degree $n\geq2$, and suppose $|f(x_i)|$ is prime for at least  $2n+1$ integers $x_i$. Show that $f(x)$ is irreducible.
I have no idea.
Thanks.

REPLY [2 votes]: Assume $f(x)=g(x)h(x)$, where $g(x),h(x)$ are polynomials of degree $m$ and $k$ respectively $\geq1$
with integer coefficients and $m+k =n$. Now the polynomials $g(x)+1,g(x)-1,h(x)+1$ and $h(x)-1$ can have atmost $m,m,k,k$ distinct integer roots, respectively. So there are at most $m + m + k + k = 2n$ $x_i$'s for which $|g(x_i)|$ or $|h(x_i)|=1$. Thus, if $f(x)$ is reducible, $|f(x)|$ will be prime for at most $2n$ integers $x_i$.