# Isomorphic finite abelian groups

Let $G$ and $H$ be finite abelian groups. Show that if for any natural number $n$ the groups $G$ and $H$ have the same number of elements of order $n$, then $G$ and $H$ are isomorphic.

I know, that for an infinity group doesn't work : $\Bbb Z_{27}$

It seems to me that I can use Finitely-generated abelian group

It is possible that this simple fact, but I would ask to write a proof .

-
Yes, use the theorem of finitely generated Abelian groups. –  Berci Dec 15 '13 at 2:07
I understand that you are not very good with English, but you should at least write everything you want to write. The second line is not even finished... –  tomasz Dec 15 '13 at 2:22

Since $G$ and $H$ are a direct product of cyclic groups of prime power order (fundamental theorem of finite Abelian groups), we just need to prove that if the number of elements of order $n$ are the same for $G$ and $H$, then both correspond to the same direct product.
Suppose $p^k$ divides both $|G|$ and $|H|$. The number of elements of order $p^k$ is $N\cdot \phi(p^k)$ where $N$ is the number of cyclic groups in the direct product of order $p^j$ for $j \ge k$. We can then easily determine $N$ for every $p^k$, and thus the whole direct product.
Since the information given is enough to completely determine $G$ and $H$, they must be isomorphic.