(How to show that something isn't an) Irreducible Polynomial in $\mathbb{Z}_5$ 
Let $f(x) = x^4+x+p$, where $p$ is a prime. I'm asked to show that if $p \neq -1$ (mod $5$), then $f(x)$ is not irreducible in $\mathbb{Z}_5$.

I guess I could try to show that $f(x)$ is not irreducible for $p=0,1,2,3$, but that seems like a lot of work and I'm guessing there's a more efficient way which I don't know.
 A: Note that $a^4=1$ for $a \neq 0$ in $\mathbb Z/5\mathbb Z$, i.e. $f(a)=1+a+p$. Hence $f(-p-1)=0$ and $f$ is not irreducible. You cannot do this for $p=-1$, because $-p-1=0$ in this case and $f(0)=p=-1$.
A: Let $f(x) = x^{p-1}+x+q$, $p$ is a prime number, $q$ is any integer, we want to find a root of $f(x)$ in $\mathbb{Z}_p$.
By Fermat's Little Theorem, any $p\nmid a$, $a^{p-1} \equiv 1 \pmod p$, so 
$$f(0) = q$$
$$f(1) \equiv 1+1+q\pmod p$$
$$f(2) \equiv 1+2+q\pmod p$$
$$...$$
$$f(p-2) \equiv 1+(p-2)+q\pmod p$$
$$f(p-1) \equiv 1+(p-1)+q\pmod p$$
Thus if $f(x)$ is irreducible in $\mathbb{Z}_p$, then it has no root in $\mathbb{Z}_p$, it must be because all $q, q+2, q+3, ... q+p$ are not divisible by $p$. Thus $p \mid q+1$, that is, $q \equiv -1 \pmod p$.
Thus if $q \not\equiv -1 \pmod p$, then $f(x)$ is reducible in $\mathbb{Z}_p$.
Let $p = 5$, and that's the answer to your question.
A: It's not that much work:
$$\begin{cases}
p\equiv 0 \pmod 5 & 0\text{ is a root}\\
p\equiv 1 \pmod 5 & 3\text{ is a root}\\
p\equiv 2 \pmod 5 & 2\text{ is a root}\\
p\equiv 3 \pmod 5 & 1\text{ is a root}
\end{cases}$$
