Let $f(n)$ denote the number of (isomorphism classes of) groups of order $n$. A couple easy facts:

- If $n$ is not squarefree, then there are multiple
*abelian*groups of order $n$. - If $n \geq 4$ is even, then the dihedral group of order $n$ is non-cyclic.

Thus, if $f(n) = 1$, then $n$ is a squarefree odd number (assuming $n \geq 3$). But the converse is false, since $f(21) = 2$.

Is there a good characterization of $n$ such that $f(n) = 1$? Also, what's the asymptotic density of $\{n: f(n) = 1\}$?