# Lecture: Strong Pseudoprimes and Primality Testing

### Background Material

### Reading

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

### Topics

- Review Fermat's Theorem
- Strong Pseudoprimes
- Quadratic residues, Wilson's theorem and Euler's test
- Probabalistic primality testing
- Review primitive elements
- Deterministic primality test

### Maple Worksheet

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

### Practice Assignment

- Experiment to verify that for a prime number that the strong pseudoprime test is
always satisfied.
- Using Maple, empirically verify Wilson's lemma and Euler's test. What happens when the
input is not prime?
- 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?
- Experiment with the Brillhard, Lehmer, Selfridge primality test.

Created: May 10 2008 (revised May 2 2012) by jjohnson AT cs DOT drexel DOT edu