Prove that $G=\mathbb{Z}_{n_1} \times ... \times \mathbb{Z}_{n_k}$ is cyclic $\iff n_1,...,n_k$ are pairwise coprime.
In order to prove this fact, I was asked to prove:
$lg=e_G$ (the identity element of G), $\forall g\in G$ where $l=LCM(n_1,...,n_k)$
$\exists g\in G$ such that $o(g)=l$, where $o(g)$ denotes the order of $g$.
I have done both of these smaller proofs and am curious about how they fit into the larger picture. Hints are appreciated, thank you!
Using those is easy, notice that the least common multiple of $n_1,n_2, \dots n_k$ is equal to the product if and only if they are pairwise coprime.
So if $n_1,n_2\dots n_k$ are not pairwise coprime we have that $l<|G|$, and we have by the first result that the order of every element in $G$ is smaller than $|G|$, so the group cannot be cyclic.
On the other hand if $n_1,n_2,\dots n_k$ are pairwise coprime then $l=|G|$, so by result two we have that there is an element $g\in G$ with $o(g)=|G|$, and so the group is cyclic.