This is a theorem given by my professor from Artin Algebra:
Suppose that a finite abelian group $V$ is a direct sum of cyclic groups of prime orders $d_j=p_j^{r_j}$. The integers $d_j$ are uniquely determined by the group $V$.
Proof: Let $p$ be one of those primes that appear in the direct sum decomposition of $V$, and let $c_i$ denote the number of cyclic groups of order $p^i$ in the decomposition. The set of elements whose orders divide $p^i$ is a subgroup of $V$ whose order is a power of $p$, say $p^{l_i}$. Let $k$ be the largest index such that $c_k>0$. Then
$l_1=c_1+c_2+c_3+...+c_k$
$l_2=c_1+2c_2+2c_3+...+2c_k$
$l_3=c_1+2c_2+3c_3+...+3c_k$
$l_k=c_1+2c_2+3c_3+...+kc_k$
The exponents $l_i$ determine the integers $c_i$.
DONE
The only thing I understand is that abelian groups can be decomposed as cyclic groups of prime order. Unlike my other questions on this site, I have zero idea about this proof. I might not even understand the statement of the proof. Please help me understand this proof.
Thanks I get it now
This is the first time I see this argument, I find it rather amusing. Let's look at it in detail.
Suppose $G$ is a direct sum of groups of the type $\mathbb{Z}/p^i\mathbb{Z}$. Write it as $$G = \mathbb{Z}/p\mathbb{Z} \oplus \dots \oplus \mathbb{Z}/p\mathbb{Z} \oplus \mathbb{Z}/p^2\mathbb{Z}\oplus \dots \oplus \mathbb{Z}/p^2\mathbb{Z}\oplus \dots \oplus \mathbb{Z}/p^k\mathbb{Z}$$ where $\mathbb{Z}/p\mathbb{Z}$ appears $c_1$ times, $\mathbb{Z}/p^2\mathbb{Z}$ appears $c_2$ times, etc. until $\mathbb{Z}/p^k\mathbb{Z}$ which appears $c_k$ times.
Clearly the $c_i$ determine $G$ up to isomorphism. The goal is to show the converse: given the isomorphism class of $G$, the $c_i$ are completely determined.
Now for each $i$ we can define $G_i\subset G$ as the subgroup of elements $x$ such that $p^ix=0$. This is a subgroup because $G$ is abelian, and clearly the order of $G_i$ is a power of $p$ (since the order of $G$ is itself a power of $p$). We have $$0=G_0\subset G_1\subset\dots \subset G_k=G.$$
Now write $|G_i|=p^{l_i}$ for some $l_i\in \mathbb{N}$. Clearly, the integers $l_i$ depend only on $G$: we did not refer at any point to the decomposition of $G$ to define them. It is obvious that we should be able to compute the $l_i$ from the $c_i$ (since the $c_i$ control all the information about $G$ up to isomorphism). If we can show that conversely the $c_i$ can be found using only the $l_i$, then we are done.
Now the rest is just some counting: how many elements does $G_i$ have, given the decomposition? Let us start with $G_1$: how many elements of order (at most) $p$ are there in $G$? Well, in $\mathbb{Z}/p^j\mathbb{Z}$, there is exactly one subgroup isomorphic to $\mathbb{Z}/p\mathbb{Z}$ (in general, in $\mathbb{Z}/n\mathbb{Z}$ there is exactly one subgroup of order $d$ if $d$ divides $n$). So in $G$, we each factor in the decomposition gives one copy of $\mathbb{Z}/p\mathbb{Z}$, which means that in total we have $c_1+\dots+c_k$ copies of $\mathbb{Z}/p\mathbb{Z}$, and $$l_1 = c_1+\dots+c_k.$$
Similarly, how many elements in $G_2$? This time, we have to make a distinction among the factors in the decomposition:
the $c_1$ factors of type $\mathbb{Z}/p\mathbb{Z}$ are indeed in $G_2$ (they are already in $G_1$), but they only contribute for $p$ elements each, so their contribution to $l_2$ is $c_1$ in total;
the $c_j$ factors of type $\mathbb{Z}/p^j\mathbb{Z}$ where $j\geqslant 2$ contain exactly one subgroup isomorphic to $\mathbb{Z}/p^2\mathbb{Z}$, so they contribute for $p^2$ elements each, which means that their contribution to $l_2$ is $2c_j$;
In total: $$l_2 = c_1 + 2c_2 + 2c_3 +\dots +2c_k.$$
It is easy to see that this goes one: $$l_i = c_1 + 2c_2 + 3c_3+\dots+ jc_j + \dots +jc_k.$$
Now we have computed the $l_i$ from the $c_j$ (and we found the same formula as in your question), and it just remain to notice that $$\begin{pmatrix} 1 & 1 & 1 & \dots & 1 \\ 1 & 2 & 2 & \dots & 2 \\ 1 & 2 & 3 & \dots & 3 \\ \vdots & \vdots & \vdots & \dots & \vdots \\ 1 & 2 & 3 & \dots & k \end{pmatrix}$$ is invertible.