Three finite groups with the same numbers of elements of each order
There exist pairs of finite groups $G$ and $H$ such that $G$ and $H$ are not isomorphic, yet they have the same number of elements of each order. For example, if $p$ is an odd prime, then the group $$H_{p} = \left\{\begin{pmatrix} 1 & a & b \\ 0 & 1 & c \\ 0 & 0 & 1\end{pmatrix} : a,b,c\in\mathbb{Z}_{p}\right\}$$ and the group $\mathbb{Z}_{p}^{3}$ both have exponent equal to $p$ and order $p^{3}$. Also, for any such pair $G$ and $H$, at least one of $G$ and $H$ must be non-commutative. My question is this:
Do there exist three groups $A$, $B$ and $C$, of the same finite order, such that no two of them are isomorphic and such that all three of $A$, $B$ and $C$ have the same number of elements of each order?
Ideally, I'd like a nice, concrete description of any examples that might exist (preferably, the smallest such), or a reference to a proof that there is no such example.
Solution 1:
Let $G$ and $H$ be the two groups of your previous example. Then $G \times G$, $G \times H$ and $H \times H$ give an example.
Solution 2:
The smallest example occurs in order 16. There are 3 nonisomorphic groups of order 16, each having 3 elements of order 2 and 12 elements of order 4. One of them is the abelian group, direct sum of two cyclic groups of order 4. Another is the direct product of the quaternion group of order 8 with a cyclic group of order 2. The third one is generated by two elements $a,b$ of order 4 with the relation $aba=b$.
In the book by Thomas and Wood, Group Tables, these are called 16/3, 16/7, and 16/10, respectively. I don't know whether other sources use this numbering.
Solution 3:
As your example suggest, take finite $p$-groups of exponent $p$ of same order.
These groups will contain $p^n-1$ elements of order $p$, where $p^n=|G|$.
Since in case of groups of order $p^3$, there are only two such groups (you written).
So to get three groups, go for higher order.