Until this point, we were just dealing with a single $n$. What if we were to deal with ranges?

Sieving (actual)

Sieving (actual)

Understanding Our Limitations

Sieve of Eratosthenes

Using Sieve

The idea of “sieving” isn’t over yet. There are several useful algorithms with similar complexity. Let’s take a look at them!