# Lecture: Strong Pseudoprimes and Primality Testing

### Background Material

• Sections 3.4 and 3.9 of the text (3.9 will be covered in more detail later).

### Topics

1. Review Fermat's Theorem
2. Strong Pseudoprimes
3. Quadratic residues, Wilson's theorem and Euler's test
4. Probabalistic primality testing
5. Review primitive elements
6. Deterministic primality test

### Maple Worksheet

1. strongpprime.mw - Maple worksheet illustrating pseudoprimes, Euler's test and a probabilistic primality test.
2. selfridge.mw - Maple worksheet illustrating Brillhard, Lehmer, Selfridge's deterministic primality test.

### Practice Assignment

1. Experiment to verify that for a prime number that the strong pseudoprime test is always satisfied.
2. Using Maple, empirically verify Wilson's lemma and Euler's test. What happens when the input is not prime?
3. Investigate for several composite numbers that some of the numbers that are relatively prime to the number do NOT satisfy the strong psuedoprime test. How many such numbers fail the test and how many pass the test?
4. Experiment with the Brillhard, Lehmer, Selfridge primality test.
Created: May 10 2008 (revised May 2 2012) by jjohnson AT cs DOT drexel DOT edu