I just constructed the semidirect product in Lang, and I'm trying to tie some facts together. From Ash's Algebra, I know that if $p\lt q$ are distinct primes, if $q\not\equiv 1\pmod{p}$, then any group $G$ of order $pq$ is abelian.
Is the converse true, that for any primes $p\lt q$, if $q\equiv 1\pmod{p}$ then there exists a nonabelian group of order $pq$?
One example I found online is that $\mathbb{Z}_3\ltimes \mathbb{Z}_7$ is nonabelian, and here $7\equiv 1\pmod{3}$. I was considering then semidirect products $\mathbb{Z}_p\ltimes\mathbb{Z}_q$ where $q\equiv 1\pmod{p}$ and some homomorphism $\phi\colon \mathbb{Z}_p\to\operatorname{Aut}(\mathbb{Z}_q)$ I calculate that $$ (1,0)(0,1)=(1+0,\phi_0(0)+1)=(1,1) $$ and $$ (0,1)(1,0)=(0+1,\phi_{-1}(1)+0)=(1,\phi_{p-1}(1)). $$ Is it true somehow that $\phi_{p-1}(1)\neq 1$ in each case to show the group is nonabelian? I guess if it did this would imply $\phi_{p-1}$ is the trivial automorphism, so maybe there's something there? If not, is there a way to show $\mathbb{Z}_p\ltimes\mathbb{Z}_q$ is nonabelian in these cases in general? Thanks.