An abelian group is expressed into the canonical form:
$$\bigoplus\mathbb{Z}_{k_i}$$
where $k_i$ are powers of primes. I want to know if the group is cyclic or not.
It seems from what I've read that such a group is cyclic if and only if $\forall i\neq j: \gcd(k_i,k_j)=1$.
I even managed to find an answer that explicitly states this. However the questions and answers that I could find are mainly concerned with the "if" part. I understand that one. But is the "only if" part true? How to prove that the group is not cyclic if some pair of the $k_i$'s are powers of the same prime?