TITLE: Invariant factors and elementary divisors of an abelian group
QUESTION [5 upvotes]: I have to find the elementary divisors and invariant factors of :
$$ \mathbb Z_6\oplus\mathbb Z_{20}\oplus\mathbb Z_{36}$$
I'm following this.
I think that elementary divisors are $\{2,2^2,2^2,3,3^2,5\}$, just using the prime decomposition of $\{6,20,36\}$.
Using the web I've put above, the invariant factor decomposition is 
$$ \mathbb Z_2\oplus\mathbb Z_{12}\oplus\mathbb Z_{180}$$
However, I have written in my notes that the invariant factors are $\{2,2,6,6,30\}$.
I'd like to know which is the right option and where and why I'm wrong.
Thanks in advance.

REPLY [5 votes]: $\mathbb Z_2\oplus\mathbb Z_{12}\oplus\mathbb Z_{180}$ is right.
Your notes must be wrong because if the invariant factors were $\{2,2,6,6,30\}$ then there wouldn't be an element of order $36$ but $\mathbb Z_6\oplus\mathbb Z_{20}\oplus\mathbb Z_{36}$ has an element of order $36$ coming from $\mathbb Z_{36}$. This also gives elements of order $4$, $9$, $12$, which are not in $\{2,2,6,6,30\}$.