Add generate_primes() functions