TITLE: Pattern of orders of elements in a cyclic group
QUESTION [11 upvotes]: Doodling as I was contemplating another recent question, I picked out the orders of elements of the cyclic group $Z_{15}$ namely:
1 element of order 1
2 elements of order 3
4 elements of order 5
8 elements of order 15
In a group of order 3 you have 1 element of order 1 and two elements of order 3.
Are there other examples of this same pattern (powers of 2), and can anyone show and prove a general rule.

REPLY [9 votes]: The number of elements of order $d$, where $d$ is a divisor of $n$, is $\varphi(d)$.
These values of $\varphi(d)$ are powers of $2$ for all divisors $d$ of $n$ precisely when $n$ is a power of $2$ times a product of distinct Fermat primes, that is, primes of the form $2^{2^k}+1$.  The power of $2$ may be $2^0$, and the product may be the empty one.
The proof is immediate from the usual formula for $\varphi$ in terms of the prime power factorization.  
So the answer is essentially the same as the classical one of which regular polygons are Euclidean-constructible. Sadly, there are not many Fermat primes known.
At this time, we only have $3$, $5$, $17$, $257$, and $65537$ to play with.