Fermat's Little Theorem offers a surprisingly efficient shortcut for identifying prime numbers, but a subtle flaw lurks ...