Generating function identity from number of irreducible monic polynomials in $\mathbf{GF}(q)$.

I denote by $m_n(q)$ the number of irreducible monic polynomials with degree $n$ over the finite field of order $q$. So the number of monic polynomials with degree is just $q^n$.

From this, how does it follow that $$\prod_{n\geq 1}\frac{1}{(1-x^n)^{m_n(q)}}=\frac{1}{1-qx}.$$ I know $$\frac{1}{1-qx}=1+qx+q^2x^2+\cdots$$ but I don't see an obvious relation between the coefficients of one to the other.

Thanks,

2nd try: Based on the help, I try to write this out in form $$(1+x+x^2+\cdots)^{m_1(q)}(1+x^2+x^4+c\dots)^{m_2(q)}\cdots=\sum_{f\text{ monic}}x^{\deg f}.$$

Due to unique factorization, distinct products of monic irreducibles of determine unique monic polynomials. So the coefficient of $x^{\deg f}$ is the number of monic polynomials of degree $\deg f$, But I'm having a hard time picturing how the expanded left hand side would count them for the identity to hold. Would someone be willing to explain this subtlety?

• Hint: Imagine expanding each term on the left, just like you did for $1/(1-qx)$. Then imagine multiplying out the expanded versions. For every $N$, you get a term in $x^N$ precisely for every product of monic irreducibles that have sum of degrees equal to $N$. It is a close analogue of the corresponding formula for the integers, and as for integers it uses unique factorization. – André Nicolas Jan 25 '12 at 19:25
• Thanks @AndréNicolas. I tried to get a little further based on your hint. If you find the time, do you mind explaining how your method works? So far I'm not able to imagine how the expanded version multiply out correctly to get the identity. – Hailie Jan 29 '12 at 8:52

$q^n$ is the number of monic polynomials of degree $n$ over $\mathbb{F}_q$, so we can write $\frac{1}{1 - qx}$ as $$\sum_{f \text{ a monic polynomial}} x^{\deg f}.$$
Now, monic polynomials can be uniquely factored into a product of irreducible polynomials, and $\deg$ satisfies $\deg fg = \deg f + \deg g$. What does that tell you about how the above generating function can be factored? (This is closely analogous to how we derive the Euler product for the Riemann zeta function.)
• Yes, but I don't see how to adapt the argument. I identify $\sum_{f\text{ monic}}$ with the $\sum_{n=1}^\infty\frac{1}{n^s}$, and $\prod_{n\geq 1}\frac{1}{(1-x^n)^{m_n(q)}}$ with $\prod_{p\text{ prime}}\frac{1}{a-p^{-s}}$. I'm trying to multiply $\sum_{f\text{ monic}}x^{\deg f}$ by certain irreducibles to then be able to subtract and clear factors like they do here. Since I don't have concrete number to work with, I don't know how to proceed. How would one correctly do this argument? – Hailie Jan 29 '12 at 7:26
• @Hailie: you can't exactly identify them. The point is that $n \mapsto \frac{1}{n^s}$ maps is a multiplicative function in the same way that $f \mapsto x^{\deg f}$ is. Does that give you any ideas? – Qiaochu Yuan Jan 29 '12 at 7:34
• Well, I see that $gf\mapsto x^{\deg fg}=x^{\deg f}x^{\deg g}$, but I don't see how this argument works. To me, $\sum_{f\text{ monic}}x^{\deg f}$ seems like it would just have form $1+x+x^2+x^3+\cdots$. I don't see any coefficients for the $x^{\deg f}$ monomials in the sum. – Hailie Jan 29 '12 at 7:49