Example of a $\mathbb{Z}$-module with exactly three proper submodules?

What is an example of a $\mathbb{Z}$-module which has exactly three proper submodules?

Solutions Collecting From Web of "Example of a $\mathbb{Z}$-module with exactly three proper submodules?"

$\mathbb{Z}/6\mathbb{Z}$ has exactly three proper submodules, namely $\{0,2,4\}$ (which is isomorphic to $\mathbb{Z}/3\mathbb{Z}$, $\{0,3\}$ (which is isomorphic to $\mathbb{Z}/2\mathbb{Z}$) and $\{0\}$.

To see that this are all $\mathbb{Z}$-submodules, i.e. subgroups of $\mathbb{Z}/6\mathbb{Z}$, notice that because $\mathbb{Z}/6\mathbb{Z}$ is cyclic every subgroup is also cyclic. Then $0$ generates $\{0\}$, $2$ and $4$ generate $\{0,2,4\}$, $3$ generates $\{0,3\}$, and $1$ and $5$ generate $\mathbb{Z}/6\mathbb{Z}$ itself.

PS: Another examples is $\mathbb{Z}/8\mathbb{Z}$; the nice thing about this example is that we can generalize it to $\mathbb{Z}/2^n\mathbb{Z}$, which has exactly $n$ proper subgroups.

A $\mathbf Z$-module is but an abelian group. For any prime $p$, $\mathbf Z/p^3\mathbf Z$ is an example of an abelian groups with three proper subgroups, which are linearly ordered. These subgroups are
$$0\subsetneq p^2\mathbf Z/p^3\mathbf Z\simeq \mathbf Z/p\mathbf Z\subsetneq p\mathbf Z/p^3\mathbf Z\simeq\mathbf Z/p^2\mathbf Z\subsetneq \mathbf Z/p^3\mathbf Z.$$