If $p\lt q$ are primes, then there is a non-abelian group of order $pq$ if and only if $q$ is 1 (mod $p$).