$\mathbb Z_{p^n}$ is not the direct product of any family of its proper subgroups I'm trying to solve this question of Hungerford's Algebra book:

$S_3$ is not the direct product of any family of its proper subgroups.
  The same is true of $\mathbb Z_{p^n}$.

The first claim is easy: we note that every subgroup of $S_3$ is of order $2$ or $3$ by Lagrange, since its subgroups are of prime order, they are cyclic, then abelian, but $S_3$ is not abelian, contradiction because $S_3$ is not abelian while the direct product of abelian groups has to be abelian.
My problem is with the second claim, I need help.
 A: Hint:
$\Bbb{Z}_{p^n}$ has the single minimal subgroup.
A: Hint
If ${\mathbb Z}_{p^n}$ is the direct product of two smaller subgroups $H_1,H_2$, then the order of any element in ${\mathbb Z}_{p^n}$ would divide $lcm(|H_1|, |H_2|)$. Since both of those orders are power of $p$, $lcm(|H_1|, |H_2|)=\max\{ |H_1|, |H_2| \}< p^n$ which contradicts the fact that ${\mathbb Z}_{p^n}$ is cyclic.
A: Well, $C_{p^n}$ is isomorphic to the direct product of itself with the trivial group, but you probably want to exclude that case.
So suppose that $C_{p^n}\simeq G\times H$ for non-trivial groups $G$ and $H$. What are the possible orders of $G$ and $H$? Could $G\times H$ contain an element of order $p^n$?
A: Suppose you could write $\mathbb{Z}_{p^n} = A \oplus B$. Then you have $|A| = p^a$ and $|B| = p^b$ with $n = a+b$ and $a,b>0$. 
$\mathbb{Z}_{p^n}$ has an element of order $p^n$, one can show that $A \oplus B$ does not. 
A: Hint:


*

*Each subgroup of a $p$-group is a $p$-group.

*Any nontrivial product of nontrivial $p$-groups is not cyclic.


The first point is trivial. For the second, notice that the order of a tuple is the least common multiple of orders of its coordinates.
In fact, you can use the same argument to show that a product of groups is cyclic iff each is cyclic and they have coprime orders.
A: Well, ${\Bbb Z}_{p^n}$ has a unique maximal subgroup, but a direct product of non-trivial groups has not.
A: Can you prove that a finite cyclic group of order $n$ has precisely one subgroup of order $d$ for each divisor $d$ of $n$?

 Hint. $$\sum_{d\mid n} \varphi(d) = n.$$

Now, what happens when we have a direct product of two groups of $p$-power order?
A: If $\mathbb{Z}_{p^n}=H \times K$, then $H \cap K= \{0\}$. Suppose there exist $h \in H\backslash\{0\}$ and $k \in K \backslash \{0\}$. Then, you can find $u,v \in \mathbb{Z}$ such that $uh=vk \neq 0$ contradicting $H \cap K\{0\}$.
