# Number of abelian groups of order 108 [duplicate]

This question already has an answer here:

What is the number of abelian groups of order 108 upto isomorphism ?

To answer this I wrote explicitly the possible abelian groups of order 108 as follows :

$$\Bbb Z_{108}$$

$$\Bbb Z_{4}\times\Bbb Z_{3}\times\Bbb Z_{9}$$

$$\Bbb Z_{2}\times\Bbb Z_{2}\times\Bbb Z_{27}$$

$$\Bbb Z_{4}\times\Bbb Z_{3}\times\Bbb Z_{3}\times\Bbb Z_{3}$$ $$\Bbb Z_{2}\times\Bbb Z_{2}\times\Bbb Z_{3}\times\Bbb Z_{9}$$

$$\Bbb Z_{2}\times\Bbb Z_{2}\times\Bbb Z_{3}\times\Bbb Z_{3}\times\Bbb Z_{3}$$

And I found the answer to be 6. But my problem is that what if I was given a much bigger number? Is this the only way to find abelian groups of a certain order? If there are better ways to find the exact answer to such question please let me know.

## marked as duplicate by Dietrich Burde, hardmath, user147263, Jonas Meyer, WintherJul 18 '15 at 7:21

Let $n=p_1^{r_1}p_2^{r_2}\cdots p_k^{r_k}$ be a prime factorization of $n\in\mathbb{N}$. For $m\in\mathbb{N}$, $C_m$ denotes the cyclic group of order $m$. An abelian group of order $n$ will be a direct sum $\bigoplus_{i=1}^k\bigoplus_{j=1}^{s_i}\,C_{p_i^{t_{i,j}}}$, where $t_{i,j}$, for $j=1,2,\ldots,s_i$ and $i=1,2,\ldots,k$, is a positive integer such that $\sum_{j=1}^{s_i}\,t_{i,j}=r_i$. We may assume that $t_{i,1}\leq t_{i,2}\leq \ldots \leq t_{i,s_i}$. Hence, the number of such abelian groups (up to isomorphism) is the product $p\left({r_1}\right)\,p\left({r_2}\right)\,\cdots \,p\left({r_k}\right)$, where $p$ is the partition function.
In your example, $108=2^2\cdot 3^3$. Now, $p(2)=2$ because $2=2$ and $2=1+1$, whereas $p(3)=3$ because $3=3$, $3=1+2$, and $3=1+1+1$. Hence, the number of abelian groups of order $108$ up to isomorphism is $p(2)\,p(3)=2\cdot 3=6$.