Consider a bootstrapping method for finding the primes up to $ \sqrt{2M}$.