what result I should consider for GCD with polynomials? I need to calculate the GCD of
$$x^4+3x^3+2x^2+x+4 \ \text{and } x^3+3x+3 \ \text{in} \ \mathbb{Z}_5$$
Using Euclid algorithm:
$$x^4+3x^3+2x^2+x+4 = (x^3+3x+3)(x+3)-3x\\ x^3+3x+3 = (-3x)(\frac{1}{3}x^2 - \frac{2}{3})+3 \\-3x = (3)(-x)+0 $$
Now I should consider the last not-null remainder (so 3) that (I think) it should be the GCD, actually it seems that the GCD is 1 according to wolfram
So my question is: what result should I consider as GCD when GCD is calculated with polynomials?

Over the field $\Bbb F_5$ we have
$$
x^4+3x^3+2x^2+x+4=(x^3 + 4x^2 + x + 1)(x + 4)
$$
and $x^3+3x+3$ has no root in $\Bbb F_5$ and hence is irreducible.
So is the other polynomial of degree $3$. Here we have used that a cubic polynomial over a field is reducible if and only if it has a root.
From this it is clear that the gcd is equal to one.
