How do I prove that $x^6+x^5+x^4+x^3+x^2+x+1$ is irreducible over $\mathbb{Z}_3[x]$? I am not really sure that the polynomial $x^6+x^5+x^4+x^3+x^2+x+1$ is really irreducible over $\mathbb{Z}_3[x]$, but all my attempts to factor it failed so far. I know I can't use Eisenstein for this so what are my options?
 A: This is the seventh cyclotomic polynomial, so its roots are the primitive
seventh roots of unity. An $n$-th root of unity generates an extension of
degree $k$ in $\Bbb F_p$ where $k$ is the least number with $p^k\equiv 1\pmod n$.
So to show that this polynomial is irreducible you need to prove the
least positive solution of $3^k\equiv1\pmod 7$ is $k=6$.
A: This polynomial is $$p(x)=\frac{x^7-1}{x-1}$$
In particular $p(x)$ divides $x^7-1$. Suppose it is reducible. Then it has an irreducible factor of degree at most $3$, say $f(x)$.
You can easily see that $p(x)$ has no roots in $\Bbb Z_3$, hence $f(x)$ has degree $2$ or $3$.
Now, there is a result on irreducibles on $\Bbb Z_p[x]$:

All irreducible polynomials of degree at most $d$ divide
  $$x^{p^d}-x$$

In particular $f(x)$ divides $$\frac{x^{27}-x}{x}=x^{26}-1$$
Hence, $f(x)$ divides $\gcd(x^{26}-1, x^7-1)$.
However,
$$\gcd(x^{26}-1, x^7-1) = x^{\gcd(26,7)}-1=x-1$$
hence $f(x)$ cannot exist. We have to conclude that $p(x)$ is irreducible.
