Taking logarithm of a generating function identity.

A week or so ago I asked why $$\prod_{n\geq 1}\frac{1}{(1-x^n)^{m_n(q)}}=\frac{1}{1-qx}$$ where $m_n(q)$ the number of irreducible monic polynomials with degree $n$ over the finite field of order $q$.

Why does taking logarithms then imply $$\sum_{n\mid r}nm_n(q)=q^r$$ for any $r$? I know taking logarithms will change it to an additive identity, but don't see how this particular equality falls out. Thank you.

-

If we take the logarithm and use the series expansion $-\log(1-t) = \sum_{n\geq 1} \frac{x^n}{n}$, we see that

$$\sum_{n \geq 1}m_n \sum_{k \geq 1}\frac{x^{nk}}{k} = \sum_{r \geq 1}\frac{q^rx^r}{r}.$$

Now compare the coefficient of $x^r$ on both sides and it follows immediately that

$$\sum_{n \mid r}nm_n = q^r.$$

Note: the product formula that you have written above is essentially the Euler factorization of the zeta function of the affine line over $\mathbb{F}_q$.

Note 2: By using the Möbius inversion formula, it follows that the number of irreducible polynomials of degree $n$ over $\mathbb{F}_q$ is

$$m_n = \frac{1}{n}\sum_{d\mid n} \mu(d)q^{n/d}.$$

(In particular, this is never $0$, because the $d=1$ term dominates the rest of the sum. Also, it's not even obvious a priori that the RHS should be an integer!)

-