5 questions to test your understanding
A student wants to test whether a 500-digit number is prime using Wilson's theorem: compute (n−1)! mod n and check if it equals −1. A classmate says this is a valid but impractical primality test. Which response best explains the computational problem?
In the proof of Wilson's theorem, why does the element p−1 not cancel with a distinct partner, and what role does this play in the final result?
Wilson's theorem states that n is prime if and only if (n−1)! ≡ −1 (mod n). For composite n > 4, (n−1)! ≡ 0 (mod n) rather than −1.
Because Wilson's theorem provides an exact test for primality, it is more reliable than probabilistic tests like Miller-Rabin, which mainly give probable primality.
Why does the pairing argument in the proof of Wilson's theorem fail for composite numbers? What property of primes makes it work?