I was working on proving Gauss' formula for the number of monic irreducible polynomials of degree d over a finite field of order q. However, me (and Serge Lang himself in his book) came up with the formula (where N(d) is number of irreducible monic polynomials of degree d): $$N(n)=(1/n)\sum_{d|n} \mu(d)q^{n/d},$$ however it seems that the common result is
$$N(n)=(1/n)\sum_{d|n} \mu(n/d)q^d.$$ Could someone please show me how it is that the two results are equal to each other? Thank you.
Just make a change of variables in the summation. If you let $e=n/d$, then $d=n/e$ and $e$ will range over all divisors of $n$ as $d$ ranges over all divisors of $n$. Thus $$(1/n)\sum_{d|n} \mu(d)q^{n/d}=(1/n)\sum_{e|n} \mu(n/e)q^{e}.$$ Renaming the dummy variable back to $d$, this gives equality of your two expressions.