I proved that if $n$ is a prime, then $p(x)=x^{n-1}+\cdots+x+1$ is irreducible over $\mathbb Z$. But, I don't know how to prove that if $p(x)$ is irreducible over $\mathbb Z$, then $n$ is prime. Can you give me a hints?