adds all the primes below a given number