Example tradeoff
Storing all the primes has the disadvantage of requiring memory proportional to the number of primes
Storing none of them slows down the algorithm
The best tradeoff might be to store the primes up to sqrt(n)
Previous slide
Next slide
Back to first slide
View graphic version