Lab 10: Prime Factorization

Open Lab Notebook in Google Colab

Learning Objectives

  1. Test whether an integer \(n\) is prime by searching for divisors.

  2. Compute prime factorizations with trial division, and speed up the search with recursion.

  3. Find every prime up to a given bound with the sieve of Eratosthenes.

Recommended Textbook Reading

From the Math 290 textbook (Doud and Nielsen):

  • §19: Prime Numbers