TITLE: Factorizing certain polynomial like $x^{10}-1$ efficiently
QUESTION [5 upvotes]: I want to know:

Is there an efficient way to factorize polynomials like
$$x^{10}-1~~~,\text{or}~~~x^{16}-x$$ over small finite fields like $F_2$ and $F_3$ for example?

How would you do that? I want to see some techniques which I can apply to other polynomials of this type. Thanks:)

REPLY [2 votes]: The remaining cases over $\mathbb{F}_3$ are given by
$$
x^{10}-1=(x^4 + 2x^3 + x^2 + 2x + 1)(x^4 + x^3 + x^2 + x + 1)(x + 2)(x + 1),
$$
and 
$$
x^{16}-1=(x^4 + 2x^2 + 2)(x^4 + x^2 + 2)(x^2 + 2x + 2)(x^2 + x + 2)(x^2 + 1)(x + 2)(x + 1).
$$
The linear factors are easy to find, but for the other factors one has to do more. The result shows that we need some general methods, and there are many of them (in particular Berlekamps's algorithm), see here.