I am trying to factor the polynomial $x^{7} - x$ over the field $\mathbb{Z_3}$. The solution is: $$x^{7} - x = x(x^6 - 1) = x(x^3 - 1)(x^3 + 1) = x(x - 1)^3(x + 1)^3.$$
I understand that the last step follows from the fact that in a field $p$ elements, $x^p + y^p = (x + y)^p$, however, my confusion lies with factoring $x^6 - 1$ into two polynomials with the same degree. If $1$ and $-1$ are the roots of $x^6 - 1$, is there some obvious way to guarantee that the factors split evenly.
I guess I could use long division each time I factor a root, and I would get the same answer, but is there some intuition, or an obvious fact behind this that I am missing? Thanks.
In any field, $x^6-1$ is a difference of squares so it will always factor into $(x^3-1)(x^3+1)$.