While we are talking about prime numbers, there is another general rule for identifying whether a positive integer 'N' is prime or not:
Take square root of N, and if its not an integer, round it down to nearest integer. Let that integer be M. Now divide N by all the prime numbers between 1 and M exclusive,and if its NOT divisible by either of those, then N must be prime .
Eg, lets see if 199 and 299 are prime or not. Lets start with 199.
Square root of 199 when rounded down to nearest integer
...
Take square root of N, and if its not an integer, round it down to nearest integer. Let that integer be M. Now divide N by all the prime numbers between 1 and M exclusive,and if its NOT divisible by either of those, then N must be prime .
Eg, lets see if 199 and 299 are prime or not. Lets start with 199.
Square root of 199 when rounded down to nearest integer
...









