Finds prime numbers within a given range, using a sieve algorithm.