Questions: Wilson's Theorem

5 questions to test your understanding

Score: 0 / 5
Question 1 Multiple Choice

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?

AThe test is invalid — Wilson's theorem only works for primes less than 100
BThe test is valid but requires computing a factorial with ~10^500 multiplications, making it exponentially slower than methods like Miller-Rabin
CThe test is valid and efficient because modular reduction keeps the numbers small throughout
DThe test is invalid for even numbers, but fast for odd candidates
Question 2 Multiple Choice

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?

Ap−1 is even, so it has no modular inverse
Bp−1 ≡ −1 (mod p), so (p−1)² ≡ 1 (mod p) — it is self-inverse and contributes the factor of −1 to (p−1)!
Cp−1 cancels with 1, leaving the middle terms to contribute −1
Dp−1 is the largest element, so it has no smaller element to pair with
Question 3 True / False

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.

TTrue
FFalse
Question 4 True / False

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.

TTrue
FFalse
Question 5 Short Answer

Why does the pairing argument in the proof of Wilson's theorem fail for composite numbers? What property of primes makes it work?

Think about your answer, then reveal below.