finding out the specified number of prime numbers