Fermat's Little Theorem offers an elegant probabilistic shortcut for detecting prime numbers, but a strange class of ...