In the finite field of $q^n$ elements, the product of all monic irreducible polynomials with degree dividing $n$ is known to simply be $X^{q^n}-X$. Why is this?
I understand that $q^n=\sum_{d\mid n}dm_d(q)$, where $m_d(q)$ is the number of irreducible monic polynomials with degree $d$, and that each element of the field satisfies $X^{q^n}-X$.
How does the conclusion follow from this? I tried substituting the exponent to $X^{\sum_{d\mid n}dm_d(q)}-X$ but this doesn't seem to do much good.