# Elementary divisors of a finite abelian group

Suppose $A$ is a finite abelian group.

(a) Extract from the function $h_A(n) = |\{x \in A : x^n = e\}|$ ($n \in \mathbb{Z}$) the elementary divisors of A using the fact that for a cyclic group $C$ of order $N$, $h_C(n) = \mathrm{gcd}(n,N)$

(b) Use part (a) to show that finite abelian groups are isomorphic if and only if their elementary divisors are the same.

I am thinking that we may factor $A$ as $A = A' \times \mathbb{Z}_n$, where $h_A(n) = e$ and then factor $A'$ using the same algorithm, etc. Although I am not sure if this is idea is correct and if so how to complete the answer based on it. Thank you.

-
What do you mean by $h_A(n)=e$? $e$ is an element of the group, and $h_A(n)$ is a natural number... Examine some simple examples, e.g. ${\bf Z}_2\times {\bf Z}_4$ and ${\bf Z}_2\times {\bf Z}_3$ –  tomasz Nov 21 '12 at 20:55
You might start by proving the lemma: if $G,H$ are finite abelian groups, then $h_{G\oplus H}(n) = h_G(n)h_H(n)$. –  Greg Martin Nov 21 '12 at 22:16