# groups with same number of elements of each order

When two groups which have the same number of elements of each order are isomorphic? Can we characterize them? I already know the abelian $Z_{p^2}\times Z_p$ and non-abelian $Z_{p^2}\rtimes Z_p$ have the same number of elements of any order, however they are not isomorphic. I mean, can we prove two abelian groups are isomorphic if they have the same orders and spectra. or even non-abelian groups?

-
Hard to tell. ${}{}$ – leo Feb 27 '14 at 21:00
Partial answer – leo Feb 27 '14 at 21:20
Notice that it is equivalent to tell that for every order,number of the cylic subgroup is same which means that if two groups are abelian, we can say that they are isomorphic.For other case,it seems really hard.it may help to think set of order preserving bijection (They also create a group.) – mesel Feb 27 '14 at 21:41
You should restrict to finite groups - for an arbitrary fixed prime $p>\!>\!1$ there exist infinitely many finitely-generated groups where every proper, non-trivial subgroup is cyclic of order $p$. – user1729 Feb 28 '14 at 9:37

My interpretation of the question is "Do there exist non-isomorphic non-abelian groups $G$ and $H$ such that $|G|=|H|$ and they have the same number of elements of the same order". This is not the classification question, but I suspect this is the question the OP wants to know the answer to (and is asked in the last line).
The solution to the non-abelian case is, perhaps, quite easy. As the OP points out, there exist abelian and non-abelian groups which have the same number of elements of any order, call them $A$ and $B$. So $A$ is abelian, $B$ is non-abelian, $|A|=|B|$ and we have the condition on the order of elements. The idea is simply to take $G=A\times B$ and $H=B\times B$.
However, cross-produts can introduce elements of new orders (for example, $\mathbb{Z}_2\times\mathbb{Z}_3\cong\mathbb{Z}_6$), so we have to be careful. I am not saying that the above construction doesn't always work, but rather you would have to prove that it always works. In order to get round this proof, take $B$ to be the following group. $$B=\langle x,y,z; x^3 = y^3 = z^3 = 1, yz = zyx, xy = yx, xz = zx\rangle$$ This group has order 27, exponent three and is non-abelian. To see this you should check that each of $(yz)^3$, $(y^2z)^3$ and $(yx^2)^3$ define the trivial element. Then take $A=\mathbb{Z}_3^3$ to be the abelian group of order 27 and exponent three. Taking $G=A\times B$ and $H=B\times B$ solve the problem!
EDIT You can find non-abelian groups of order $p^n$ and exponent $p$, $p>2$, by considering the subgroup $S_n^p$ of $GL_n(\mathbb{Z}_p)$ consisting of upper-triangular matrices, so $S_3^p$ consists of matrices of the following form. $$\left( \begin{array}{ccc} 1&\ast&\ast\\ 0&1&\ast\\ 0&0&1 \end{array} \right)$$ The $3\times 3$ matrix groups constructed this way are called Heisenberg groups, and its isomorphism class is that of the extra-special $p$-group of exponent $p$. This means that you can find lots of non-isomorphic groups with the same orders and spectra.