Uniqueness of maximal subgroup and order being a power of a prime

abstract-algebrafinite-groupsgroup-theorymaximal-subgroup

Let $G$ be a finite group. If $G$ has only one maximal subgroup (a maximal subgroup is a proper subgroup $M$ that given a subgroup $H$ of $G$, $M \subset H \subset G$ implies that $H = M$ or $H = G$), prove that the order of $G$ is a power of a prime.

I've been stuck in this exercise for a few days now and just can't solve it.

I tried applying Cauchy to $p$ and $q$ primes that divide the order of $G$ and also to analyse maximal subgroups containing the generated subgroups of the elements of order $p$ and $q$ given by Cauchy's theorem, but without any success.

Best Answer

Hint: Let $x \notin M$, where $M$ is the unique maximal subgroup. What can you say about $\langle x \rangle$?