OCR MEI Further Pure with Technology 2023 June — Question 3

Exam BoardOCR MEI
ModuleFurther Pure with Technology (Further Pure with Technology)
Year2023
SessionJune
TopicNumber Theory

3 Wilson's theorem states that an integer \(p > 1\) is prime if and only if \(( p - 1 ) ! \equiv - 1 ( \bmod p )\).
  1. Use Wilson's theorem to show that \(17 ! \equiv 1 ( \bmod 19 )\).
  2. A prime number \(p\) is called a Wilson prime if \(( p - 1 ) ! \equiv - 1 \left( \bmod p ^ { 2 } \right)\). For example, 5 is a Wilson prime because \(( 5 - 1 ) ! \equiv 24 \equiv - 1 ( \bmod 25 )\). At the time of writing all known Wilson primes are less than 1000.
    1. Create a program to find all the known Wilson primes. Write out your program in full in the Printed Answer Booklet.
    2. Use your program to find and write down all the known Wilson primes.
    3. Prove that if there is an integer solution \(m\) to the equation \(( p - 1 ) ! + 1 = m ^ { 2 }\) where \(p\) is prime, then \(p\) is a Wilson prime.