Let M be the unique maximal subgroup of G. Let x ∈ G \M. Suppose <x> is not equal to G. Then
<x> is proper, hence is contained in some maximal subgroup (since G is finite), which must
be M . Then x ∈ M, a contradiction. Thus <x> = G, so G is cyclic. Suppose p and q are
distinct primes dividing |G|. Then, since G is cyclic, G has subgroups H and K satisfying
|G|/|H| = p and |G|/|K| = q. This implies H is maximal: if a subgroup M satisfies
H ≤ M ≤ G, then |H| divides |M| and |M| divides |G|. Then |M|/|H| divides p. Since p is
prime, |M| = |H| or |M| = |G|, so M = H or M = G. Similarly K is maximal. This is a
contradiction, since H is not equal to K. Thus |G| is a power of a single prime.