# Irreducible factors of $X^p-1$ in $(\mathbb{Z}/q \mathbb{Z})[X]$

Is it possible to determine how many irreducible factors has $X^p-1$ in the polynomial ring $(\mathbb{Z}/q \mathbb{Z})[X]$ has and maybe even the degrees of the irreducible factors? (Here $p,q$ are primes with $\gcd(p,q)=1$.)

-
$x^p-1=(x-1)^p$ –  user8268 Jul 6 '12 at 13:41
sorry, I wrote $p$ instead of $q$ –  Narayan Jul 6 '12 at 13:45

It has one factor of degree $1$, namely $x-1$. All the remaining factors have the same degree, namely the order of $q$ in the multiplicative group $(\mathbb{Z}/p \mathbb{Z})^*$. To see it: this is the length of every orbit of the action of the Frobenius $a\mapsto a^q$ on the set of the roots of $(x^p-1)/(x-1)$ in the algebraic closure.