# Number of irreducible polynomials over $\mathbb Z_p$ [duplicate]

This question already has an answer here:

How many irreducible polynomials over $\mathbb Z_p$ of the form $x^2+ax+b$ are there?

No idea.

## marked as duplicate by tomasz, Davide Giraudo, Martin, Erick Wong, SashaApr 13 '13 at 13:34

The formula is $$\frac{p^2 - p}{2}.$$ The reason is that the polynomial $$x^{p^{2}} - x$$ factors as the product of all the distinct irreducible, monic polynomials of degree dividing $2$, thus of degree $1$ or $2$, And there are $p$ monic polynomials of degree $1$.
More generally, $$x^{p^{d}} - x$$ factors as the product of all the distinct irreducible, monic polynomials of degree dividing $d$. In general, to recover the number of the irreducible, monic polynomials of degree $d$, you have to use Moebius inversion.