# If each $G_i$ is cyclic, then $G_1 \times G_2 \times … \times G_n$ is cyclic if, and only if, $\gcd(|G_i||G_j|) = 1$ whenever $i \ne j$

Let $$G_1, G_2, ... , G_n$$ be finite cyclic groups. I want to show that $$G_1 \times G_2 \times ... \times G_n$$ is cyclic if, and only if, $$\gcd(|G_i||G_j|) = 1$$ whenever $$i \ne j$$. I do know that if $$G$$ and $$H$$ are finite cyclic groups, then $$G \times H$$ is cyclic if, and only if, $$\gcd(|G||H|)=1$$. I'm assuming that some form of induction would work when dealing with $$n$$ finite cyclic groups, but I have absolutely no idea how to apply it.

Any help would be much appreciated.

You're exactly right, you need to use induction. I'm going to write $$m_i:=|G_i|$$; so in one direction, if $$\gcd(m_i,m_j)=1$$ for $$i\neq j$$, then by the induction hypothesis you have that $$G_1\times\cdots\times G_{n-1}$$ is cyclic. Then using the result for $$n=2$$ (which you say you already know), you just need to show that $$\gcd(m_1\cdots m_{n-1},m_n)=1$$ to deduce that $$(G_1\times\cdots\times G_{n-1})\times G_n$$ is cyclic as well.
On the other hand, if $$G_1\times\cdots\times G_n$$ is cyclic, recall a quotient of a cyclic group is cyclic, so $$G_1\times\cdots\times G_{n-1}$$ and $$G_n$$ are cyclic groups, and by the induction hypothesis on the former you see that $$\gcd(m_i,m_j)=1$$ whenever $$1\le i,j\le n-1$$ and $$i\neq j$$. But then again you can use the $$n=2$$ case to also deduce that $$\gcd(m_1\cdots m_{n-1},m_n)=1$$, and putting these two facts together find that $$\gcd(m_i,m_j)=1$$ whenever $$1\le i,j\le n$$ and $$i\neq j$$.
• I kind of get it. With the first part though, I knew that $gcd(|G_n|, |G_i|) = 1$ for all $i \ne n$. How do I prove from there that $gcd(|G_1 \times G_2 \times ... \times G_{n-1}|, |G_n|) = 1$? Once I know that $|G_1 \times G_2 \times ... \times G_{n-1}|$ and $|G_n|$ are coprime, then the result for $n=2$ tells us that $(G_1 \times G_2 \times ... \times G_{n-1}) \times G_n$ is cyclic. – Tim Aug 18 '19 at 22:21
• If $\gcd(|G_1|\cdots|G_{n-1}|,|G_n|)\neq1$, then there is some prime (say $p$) dividing both $|G_1|\cdots|G_{n-1}|$ and $|G_n|$. Now recall it's a classic result that if a prime divides a product $ab$, then the prime divides either $a$ or $b$; then of course with induction you can conclude that if $p$ divides a product $a_1\cdots a_m$ then $p$ divides some $a_i$, so in our case we can conclude $p$ divides some $|G_i|$ with $1\le i\le n-1$. From this conclude that $\gcd(|G_i|,|G_n|)\neq1$ for some $i\in\{1,\dots,n-1\}$, giving a contradiction. – Alex Mathers Aug 19 '19 at 18:19