I'm looking at how to find generators of finite fields, such as $$ \mathbb{F}_{25} := \frac{\mathbb{Z}_5[x]}{(x^2+2)} $$
or like $S := \dfrac{\mathbb{Z}_5[x]}{(x^2+x+2)}$ in Generators of a quotient ring.
For the second, DonAntonio shows, writing $w = x + (x^2+x+2)$ and equalities mod 3, that
$$\begin{align*}&w\\ &w^2=2w+1\\ &w^3=w(2w+1)=2w^2+w=2(2w+1)+w=w+2+w=2w+2\\ &w^4=w(w^3)=2w^2+2w=2(2w+1)+2w=w+2+2w=2=-1\end{align*}$$
Noting that we need only find an element $g \in S$ such that $g^4 \neq 1$ as by Lagrange the order is then 8.
That works out cleanly, but the image of $x$ by the quotient map isn't a general solution for a general group, which we can see from $y = x + (x^2+2) \in \mathbb{F}_{25}$ has (mod 5)
$$ \begin{align*} &y\\ &y^2 = -2\\ &y^4 = 4 = -1\\ &y^8 = 1\\ \end{align*}$$
so $y$ doesn't generate the units of $\mathbb{F}_{25}$. (Or directly from $y^2 \in \mathbb{Z}_5$ so $y^8 = (y^2)^{(5-1)} = 1$)
Is there a smarter way for either this specific example, or for a more general $\dfrac{\mathbb{Z}_p[x]}{(f(x))}$ or $\dfrac{\mathbb{Z}[x]}{(g(x))}$ for irreducible $f$ or $g$ than brute-forcing elements in the field until you find one that has the required order?