Number of monic irreducible polynomials over a finite field
= Number of monic irreducible polynomials over a finite field
{title2=$N_q(n)$}
Let $N_q(n)$ be the number of <monic> <irreducible polynomials> of <polynomial degree> $n$ over $\mathbb F_q$. Factoring $X^{q^n}-X$ into all such polynomials whose degrees divide $n$ gives
$$
q^n=\sum_{d\mid n}dN_q(d).
$$
The <Möbius inversion formula> therefore gives
$$
N_q(n)=\frac1n\sum_{d\mid n}\mu(d)q^{n/d}.
$$