let $G$ be an infinite group of the form $G_1 \oplus G_2 \oplus \dots \oplus G_n$ where each $G_i$ is a non trivial group and $n>1$. Prove that $G$ is not cyclic.
Attempt : Let $G = G_1 \oplus G_2 \oplus \dots \oplus G_n$ be cyclic.
then $\exists ~g =(g_1,g_2,......,g_n)$ such that $g$ is generator of $G$ if and only if :
$(i)~~ g_1$ generates $G_1, ~g_2$ generates $ G_2$, and so on.
$(ii)~\gcd(|g_i|,|g_j| =1)$ whenever $i \neq j$ .
Since a group of prime order is cyclic, this means that if we take $G_i$ such that $|G_i|=p_i$ , where $p_i$ is a prime number and for any $i \neq j,~\gcd (p_i,p_j) =1$ , hence, if we take $G_i$'s in this fashion such that $g_i$ of prime order generates $G_i$, $G$ should turn out to be cylic?
Where could I be making a mistake? Thank you for the help.
You can prove this as follows: Suppose $G$ is cyclic, then each $G_i$ must be cyclic (being subgroups of $G$). Since $G$ is infinite, one $G_i$ must be infinite; so assume without loss of generality that $G_1$ is infinite and cyclic, so $G_1 \cong \mathbb{Z}$.
Choosing $G_2$ to be infinite ($\cong \mathbb{Z}$) or finite ($\cong \mathbb{Z}/n\mathbb{Z}$) gives two cases :
In order to show $G$ is not cyclic, you now reduce to showing that both $\mathbb{Z}\oplus \mathbb{Z}$ and $\mathbb{Z}\oplus \mathbb{Z}/n\mathbb{Z}$ are not cyclic. Each of these is fairly simple; so you get a contradiction.