There is a proposition in Beachy and Blair's Abstract Algebra that I don't entirely follow. The proposition is the following:
Let $G$ be a group of order $pq$, where $p > q$ are primes.
a) If $q$ is not a divisor of $p-1$, the $G$ is cyclic.
b) If $q$ is a divisor of $p-1$, then either $G$ is cyclic or else $G$ is generated by two elements $a$ and $b$ satisfying the following equations: $$a^p = e, \\ b^q = e,\\ ba = a^nb $$ where $n \not \equiv 1 \ (mod \ p)$ but $n^q \equiv 1 \ (mod \ p)$.
Can one of you prove how this is true? I understand a similar proof for when $q=2$, but this one is more complicated.