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?
If $p(x)=x^3+a_2x^2+a_1+a_0$ is an irreducible polynomial in $\Bbb{Z}_3[x]$, and $c$ is (one of) its zero(s) in an extension field, then, by Galois theory of finite fields, the other zeros are $c^3$ and $c^9$. We thus have $$p(x)=(x-c)(x-c^3)(x-c^9).$$ Expanding gives (look at the constant terms, or recall the Vieta relations) $$-a_0=c^{1+3+9}=c^{13}.$$
The polynomial $p(x)$ is primitive if and only if $c$ has multiplicative order $3^3-1=26$. As the prime factorization reads $26=2\cdot13$, you need to check, for both of your irreducible polynomials, that
I think you have everything you need now.