TITLE: Prove that a group with exactly two proper nontrivial subgroups is isomorphic to $\mathbb{Z}_{pq}$ or $\mathbb{Z}_{p^3}$.
QUESTION [8 upvotes]: 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?

REPLY [2 votes]: Suppose that $G$ has exactly two nontrivial proper subgroups $H$ and $K$.
If $K$ has a proper nontrivial subgroup, then $H \leq K$. Thus $K$ has exactly one proper nontrivial subgroup, which means that $K$ is cyclic of order $p^2$. Hence $G$ must be a $p$-group of order $p^3$, and any element $x \not\in K$ will generate $G$.
If $H$ and $K$ do not have proper nontrivial subgroups, $H$ and $K$ will be cyclic of prime order. It is clear that $H$ and $K$ will be normal subgroups and that $G$ is cyclic of order $pq$.
You try can classify groups with exactly $n$ subgroups for small $n$. This is the case $n = 4$. You can try to do the case $n = 5$ by using the classification of groups with exactly $n = 1, 2, 3, 4$ subgroups. A starting point is to notice that if a group with $n$ subgroups contains a subgroup with $n-1$ subgroups, it will be cyclic.
After that you can think about how the number of subgroups affects the structure of groups. What is the largest $k$ such that every group with $\leq k$ subgroups is cyclic? Abelian?