Generates requested number of prime numbers