Consider the set of polynomials with degree $n\leq 3$ with coefficients in $\mathbb{Z}_3$. A problem that I am working on is to determine the number of irreducible degree 3 monic polynomials.
My approach to this is to slowly construct the reducible polynomials, and then to subtract the number of those from the total number of possible polynomials.
There must be 6 prime linear factors since $ax+b$ must have $a$ being 1 or 2, and $b$ being 0, 1 or 2.
To construct reducible quadratic factors, I was initially tempted to just say that there are just $6+5+4+3+2+1=21$ of them since we just multiply any two of the 6 prime linear factors (including themselves).
But what I then realised is that this will over-count the number of reducible quadratic factors ie: $(2x+1)(2x+1)=x^2+x+1$ since we are working in mod 3.
I could work out all the cases by hand, but is there an easier way of counting the number of these reducible quadratic factors?
It may be surprising to you but it is easier to count the number of irreducible polynomials, because they are over a finite field, and each irreducible cubic would correspond to $3$ distinct roots in a field extension of degree $3$, and those roots are not in the base field. If we look only at roots in the algebraic closure of the base field, how many distinct field extensions of degree $3$ are there? Note also that different irreducible cubics cannot share roots here. This way you can literally count the number of roots of irreducible cubics by counting the number of elements in the degree $3$ field extension and subtracting away the number of elements in the base field before dividing by $3$ to get the number of irreducible polynomials.