Question: Let $\forall m: E_m:S^1\to S^1$, $x\mapsto mx (\mod{1})$ be the expanding map of the circle. What is the number of periodic points of $E_m$ of (minimal) period $n$?
Motivation: In Barreira & Valls' Dynamical Systems: An Introduction on p. 25 it is asked to show the number of periodic points of $E_m$ with period $p=q^r$ for prime $q$ and natural $r$ is $n_m(p):=m^p-m^{p/q}$. My question is a generalization of this question, where we consider not prime powers but arbitrary natural numbers.
I thought of starting with the prime factorization of $n$, but it turns out to be a messy process because we need to think of all combinations. Any ideas or elegant proofs are welcomed.
This is an example of Möbius inversion. The number of points with period dividing $n$ is $m^n$, so if $f_m(n)$ denotes the number of points with period exactly $n$, we have $$m^n = \sum_{d|n} f_m(d),$$ where the sum runs over all divisors of $d$. The Möbius inversion formula then tells us that $$f_m(n)=\sum_{d|n} \mu(d) m^{n/d},$$ where $\mu(d)$ is $0$ if $d$ is divisible by a square, else $(-1)$ raised to the number of prime factors of $d$. In particular $\mu(q)=-1$ for any prime $q$, which gives the special case you mentioned.