<s>[INST] Generators of a quotient ring I have a polynomial ring $\mathcal{R} = \mathbb{Z}_3[x]/(x^2+x+2)$ and I am supposed to find a generator of the multiplicative group of $\mathcal{R}$. 
Well, I know that the $\vert \mathcal{R} \vert = 9$, therefore the number of elements of the multiplicative group is $9-1 = 8$ and that the elements $f(x)\in$ $\mathcal R$ are $[f(x)]=\{g(x) \in \mathbb Z_3 \mid g(x) \equiv f(x)$ mod $(x^2+x+2) \}$. Though I do not know how to find the generator instead of brute-forcing. Is there a smart way to do it? Thank you in advance.
 [/INST] The ring is the splitting field of $x^9-x$; since
$$
x^9-x=x(x^8-1)=x(x-1)(x+1)(x^2+1)(x^4+1)
$$
and $x^4+1=(x^2+x+2)(x^2+2x+2)$, the complete factorization is
$$
x^9-x=x(x^8-1)=x(x-1)(x+1)(x^2+1)(x^2+x+2)(x^2+2x+2)
$$
Note that if $\alpha$ is a root of $x^2+1$, then $\alpha^4=1$, so it is not good for the purpose. Thus we remain with the roots of the other degree two factors: indeed the group is cyclic of order $8$, so it must have $\varphi(8)=4$ elements which are generators.
</s>