<s>[INST] Primitive Polynomials over $\mathbb{Z}_3$ Which of the following polynomials are primitive over $\mathbb{Z}_3$?

*

*$x^3 + x^2 + x + 1$

*$x^3+x^2+x+2$

*$x^3+2x+1$
So I now in order to be primitive the polynomials have to be irreducible, which is only true for $x^3+x^2+x+2$ and $x^3+2x+1$.
But how do I show if they are primitive?
 [/INST] Hint
There are $4=\dfrac {\varphi (3^3-1)}3$ primitive third degree polynomials over $\Bbb F_3.$
Let $t$ be a root of $x^3+2x+1.$  Take $\alpha=t+(x^3+2x+1),$ a primitive $26$th root of unity in $\Bbb F_{27}$.

We know $\alpha $ is primitive because $t^2\neq1$ and by the Frobenius automorphism,  $$t^9=(t^3)^3=(t-1)^3=t^3-1=t+1\implies t^{13}=t^{3+9+1}=t(t-1)(t+1)=t^3-t=-1.$$

Then the primitive polynomials are:
$$\begin {align}p_1=(x-\alpha)(x-\alpha ^3)(x-\alpha ^9),\, &\\p_2=(x-\alpha ^5)(x-\alpha^{15})(x-\alpha ^{19}),\,&\\p_3=(x-\alpha ^7)(x-\alpha ^{21})(x-\alpha ^{11})\,,&\\p_4=(x-\alpha ^{17})(x-\alpha ^{25})(x-\alpha ^{23})\end{align}.$$
So let's take $$p_1=(x-\bar t)(x-\bar t^3)(x-\bar t^9)=x^3-(\bar t+\bar t^3+\bar t^9)x^2+(\bar t^4+\bar t^{12}+\bar t^{10})x-(\bar t^{13})=x^3-x+1.$$
Etc.
</s>