I would like to prove the following statement.
If $n$ is a prime number, then the factorization of $x^n-1$ over $\Bbb{Z}$ contains only $2$ factors, and those factors are: $$x^n-1=(x-1)(x^{n-1}+x^{n-2}+\cdots+x+1).$$
I have already proved that the factorization above is valid for all $n\in\Bbb{N}$, what's left to prove is that if $n$ is a prime number, then $(x^{n-1}+x^{n-2}+\cdots+x+1)$ is irreducible. I know the Eisenstein's criterion could be used, but I have no clue how the proof can be developed. Help!
PS: If it helps with anything, I have also proved the inverse. That is, if $n$ is a compound number, then the factorization $x^n-1$ contains more than 2 factores (which I don't think it helps at all).
The $n$th roots of unity are any numbers $c$ such that $c^n=1$ (these include complex numbers). A primitive $n$th root of unity is any number $c$ such that $c^n=1$ and $n$ is the smallest integer $k$ such that $c^k=1$. Reading from here, there are exactly $ϕn$ primitive $n$th roots of unity for all $n$. This follows from the fact that if $d|n$, then $x^d-1 | x^n-1$ and any $d$th root of unity is also an $n$th root of unity, so then in order to be a primitive $n$th root of unity, $d$ must be relatively prime to $n$, therefore there are $ϕn$ roots of unity. If $n$ is prime, then $1$ is the only non primitive $n$th root of unity, and the rest are primitive root of unity. Since the number of $n$th primitive roots of unity is $ϕn$ and $n$ is prime, there are $n-1$ primitive $n$th roots of unity. There must be an irreducible polynomial, also known as the $n$th cyclotomic polynomial, which contains all primitive $n$th roots of unity. In turn from the information above, the $n$th cyclotomic polynomial has degree $ϕn$, but since $n$ is prime, the $n$th cyclotomic polynomial is of degree $n-1$, and $(x^n-1)/(x-1)$ is indeed the $n$th cyclotomic polynomial and $x^n-1$ will only have two polynomial factors. If $n$ is composite, then $ϕn$ < $n-1$ and the $n$th cyclotomic polynomial is not of degree $n-1$, therefore $(x^n-1)/(x-1)$ is not irreducible and $x^n-1$ contains at least $3$ polynomial factors.