<s>[INST] Factoring $x^5-1$ over $\mathbb{Z_5}$ How do I completely factor $x^5-1$ over $\mathbb{Z_5}$? 
I saw one was a root so I divided by $x-1$ and got $(x-1)(x^4+x^3+x^2+x+1)$ which duh is the 5th cyclotomic polynomial and this is the same factorization over the integers. Do I just look for roots from here or is there a better way to go about this? I mean I know I could try to factor it as arbitrary quadratics also, but i'm wondering if there was a more fundamental insight that i'm missing that would make this simpler. Thanks!
 [/INST] Since $1$ is a root, we can divide out $x-1$ by the factor theorem: $x^5-1=(x-1)(x^4+x^3+x^2+x+1)$.
$1$ is a root of $x^4+x^3+x^2+x+1$, so we can divide it out again: $x^4+x^3+x^2+x+1=(x-1)(x^3+2x^2+3x+4)$
$x^3+2x^2+3x+4=(x-1)(x^2+3x+1)$. 
Lastly,
$x^2+3x+1=(x-1)(x-1)$. So we can write $x^5-1$ as the product $(x-1)^5$ in $\mathbb{Z}[x]$.
</s>