Wikipedia says that the pair $(m, m+2)$ are simultaneously prime iff $$4((m-1)! + 1) \equiv -m \mod m(m+2)$$
which I imagine is easily proven using the Chinese Remainder Theorem and Wilson's Theorem. I was wondering if there is a generalization to more simultaneous primes, each of the form $am+b$. My own attempts have gotten quite messy.