Length of Abelian Group

Theorem
Let $G$ be an abelian group whose order is $n$.

Let $n$ have the prime decomposition:
 * $\ds n = \prod_{i \mathop = 1}^r p_i^{k_i} = p_1^{k_1} p_2^{k_2} \cdots p_r^{k_r}$

where $p_1 < p_2 < \cdots < p_r$ are distinct primes and $k_1, k_2, \ldots, k_r$ are positive integers.

Then the length of $G$ is given by:
 * $\ds \map l G = \sum_{i \mathop = 1}^r k_i = k_1 + k_2 + \cdots + k_r$