[Math] Prove that a group with exactly two proper nontrivial subgroups is isomorphic to $\mathbb{Z}_{pq}$ or $\mathbb{Z}_{p^3}$.

abstract-algebrafinite-groupsgroup-theory

Suppose $G$ is a group and has exactly two nontrivial proper subgroups. Prove that $G$ is cyclic and $|G|=pq$ where p,q are distinct primes or $G$ is cyclic and $|G|=p^3$ where $p$ is a prime. Usually my tactic to show a group is cyclic is find an elements such that its order and order of the group are the same. But here I cannot do so because I have no informatio regarding order of elements. So I stuck. Can anyone help me?

Best Answer

Hint: If there are only two subgroups $H,K \subset G$ then $H \cup K \neq G$ (why?). Now what can you say about an element $g \in G \setminus (H \cup K)$?