# For which $n$ is there only one group of order $n$?

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

1. If $n$ is not squarefree, then there are multiple abelian groups of order $n$.
2. 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\}$?

-
(In case people want some data and known results, oeis.org/A000001) –  Andres Caicedo Nov 13 '13 at 4:32
Presumably the density of $n$ with $f(n)=1$ is zero, because there are lots of semidirect products. –  Lucia Nov 13 '13 at 4:40
Since we always have the cyclic group of order $n$, then $f(n)=1$ if and only if $n$ is a cyclic number. The cyclic numbers are well known: they are the square-free integers $n=p_1\cdots p_r$, where $p_1\lt p_2\lt\cdots\lt p_r$ in which $p_i$ does not divide any of $p_j-1$ for all $j\neq i$. See e.g. Pete Clark's answer here and references cited there. –  Arturo Magidin Nov 13 '13 at 6:06
@DanielHast: The explicit description I give is equivalent to Gerry Myerson's below ($\gcd(n,\varphi(n))=1$). –  Arturo Magidin Nov 13 '13 at 6:31
I'd rather have thought this question would be a good candidate for migration to Math.SE ... . –  Stefan Kohl Nov 13 '13 at 14:04

$f(n)=1$ if and only if $\gcd(n,\phi(n))=1$, where $\phi$ is the Euler phi-function. These $n$ are tabulated at http://oeis.org/A003277

The result is found in Tibor Szele, Über die endichen Ordnungszahlen, zu denen nur eine Gruppe gehört, Comment. Math. Helv. 20 (1947) 265–267, MR0021934 (9,131b).

-

Let $G(x)$ denote the number of $n \leq x$ such that there is exactly $1$ isomorphism class of groups of order $n$. Then: $$G(x) \sim e^{-\gamma}\frac{x}{\log\log\log(x)}$$ where $\gamma$ is Euler's constant. This is a result of Erdos, Murty and Murty. Their paper also contains other interesting results on the distribution of values of the group order function.

-
Thanks — that's an interesting paper. To clarify, does $\gamma$ denote the Euler–Mascheroni constant? –  Daniel Hast Nov 13 '13 at 5:08
@Daniel, Yes. It arises (essentially) through the use of Merten's formula. –  Mark Lewko Nov 13 '13 at 5:18

The original question has already been answered, so I thought I would provide a slightly more general version.

The short paper http://www.math.ku.dk/~olsson/manus/three-group-numbers.pdf describes those orders for which there are precisely 1, 2 or 3 groups of the given order.

-

If $p$ is the smallest prime dividing $n$, then if $n=pm$ and $p|\phi(m)$ then there exists a semidirect product of the cyclic group of order $p$ and the cyclic group of order $m$. So $f(n)$ is not $1$ for such $n$. Now given a prime $p$, most values of $m$ that are odd and coprime to $p$ will have $\phi(m)$ being a multiple of $p$ (all we need is some prime factor of $m$ to be $1\pmod p$, and usually $m$ will have some such factors). Since most numbers won't be coprime to all small primes, this will give a proof that the density of numbers with $f(n)=1$ is zero.

Note: Mark Lewko posted the interesting reference to Erdos, Murty & Murty while I was writing the answer above. Comparing our answers, one can see that the numbers with $f(n)=1$ are closely related to the numbers $n$ having no prime factor below $\log \log n$.

-