Good morning :)
So I had an exercise, which asks "how many monic irreducible polynomials are there of degree 3 over the finite polynomial ring $\Bbb F_p[X]$, where $p$ is some prime?"
I was wondering if you can do this via counting?
I know that there are $ p(p-1)/2$ monic irreducible polynomials of degree 2 over $\Bbb F_p[X]$.
And then I counted how many reducible polynomials of degree 3 there are, which is:
A reducible polynomial of degree 3 has to have at least one linear factor.
Then we have 4 options:
1) $(X-a)(X^2 + bX + c)$, where the quadratic term is irreducible. => There are $p^2(p-1)/2$ polynomials of this form.
2) $(X-a)^3$ => p polynomial of this form.
3) $(X-a)^2*(X-b)$, where $a$, $b$ distinct => $p(p-1)/2$. polynomials of this form.
4) $(X-a)(X-b)(X-c)$, where $a, b, c$ pairwise distinct => $p(p-1)(p-2)/6$ polynomials of this form.
And in total I have $p^3$ possible monic polynomials of degree 3 with coefficients in $\Bbb F_p$.
So then the number of irreducible, monic polynomials of degree $3$ over $\Bbb F_p$ is
$p^3 - (p^2(p-1)/2 + p + p(p-1)/2 + p(p-1)(p-2)/6) = p(p-1)(p+3)/3$ when I count it.
However I know the correct solution is supposed to be $(p^3 - p)/3$. Now I do not see where I made the mistake, if anybody here can spot my mistake I would be very thankful.
Thank you in advance. :)