Irreducible polynomial is square-free modulo almost every prime Let $f \in \Bbb Z[X]$ be irreducible. What is the easiest way to show that there are only finitely many primes $p$ such that $f \pmod p$ is not square-free (i.e. not separable) in $\Bbb F_p[X]$ ?
Is it necessary to use the fact that a prime $p$ is ramified in a number field iff $p$ divides the discriminant (hence there are finitely many such primes)?
Thank you?
 A: Since $f$ is irreducible in $\mathbb{Z}[x]$, it's irreducible in $\mathbb{Q}[x]$, so in $\mathbb{Q}[x]$, we have $\gcd(f,f')=1$.

It follows that $af+bf'=1$, for some $a,b\in\mathbb{Q}[x]$.

Clearing denominators, we get $Af+Bf'=n$, for some $A,B\in\mathbb{Z}[x]$, and some positive integer $n$.

Suppose $p$ is a prime which not a prime factor of $n$.

Then $n$ is a unit, mod $p$, hence from the equation $Af+Bf'=n$, we get that $f$ and $f'$ have no non-unit common factor, mod $p$.

It follows that $f$ is squarefree, mod $p$.
A: Any multiple factor of $f \bmod p$ is also a factor of $f' \bmod p$.
Now $f$ and $f'$ have no common factor of degree $1$ or higher in $\mathbb Z[x]$. Conduct the Euclidean algorithm over $\mathbb Z$ - this leads to an integer (which will not be $1$ if $f$ is not primitive) because there is no common factor of degree $1$ or higher.
If $f$ and $f'$ have a common factor modulo $p$, then the Euclidean algorithm must terminate early modulo $p$, and therefore must involve a prime factor of one of the successive remainders in the original. There are only finitely many possibilities.
