generate 'n' number of prime numbers implementation