Starting prime number generation
Logic implemented to check whether a number is prime