Added generate_primes() and generate_n_primes()