Let $p$ be prime, $n \in \mathbb{Z}$. Show that if $\Phi_{5}(n) = n^4 + n^3 + n^2 + n + 1 \equiv 0 \pmod{p}$, then $p = 5$ or $p \equiv 1 \pmod{5}$.
If $p = 5$, then we are done. If $p \neq 5$, then I believe I may follow an argument here by Thomas Andrews, whose answer I do not fully understand. We notice that $n \neq 1 \pmod{p}$ (because, otherwise, $n^4 + n^3 + n^2 + n + 1 \equiv 5 \not \equiv 0 \pmod{p}$). How does one then conclude that $n^5 \equiv 1 \pmod{p}$? Also, how does one know that $5$ is the order of $n$-- and not some power between $1$ and $5$?
I can piece together the remainder of the argument: In noticing that $n \neq 0 \pmod{p}$, one can use Fermat's Little Theorem to conclude $n^{p-1} \equiv 1 \pmod{p}$. In establishing that $n$ has order $5$, we may conclude that $5|p-1$, hence that $p \equiv 1 \pmod{5}$, as desired.