You are on page 1of 1

How to test whether a number is prime of not

To check a number N is prime


Step 1 : Take the square root of the number N.
Step 2 : Check divisibility of the number N by all prime numbers below square root of N. If it is
not divisible by all of them then it is a prime number.
eg. Let N = 211 ,then square root of 211 = Between 14 and 15
Prime numbers up to 14 are 2, 3, 5, 7, 11, 13 .
Now 211 is not divisible by any one of them .Hence 211 is prime.
In the above process we take prime numbers up to square root of N and not above that. The
reason behind that is for any natural number ,number of factors below the square root is same
as number of factors above the square root. So if there is no factor below the square root
(except 1), there will not be any factor above the square root (except N) also.

EXAMPLE Check that whether 241 is prime.

SOLUTION When we take the square root of 241 it is approximate 15, so we consider it 16.
Now we divide 241 by all the prime numbers below 16

Since 241 is not divisible by any one of the prime numbers below 16. So it is a Prime number.

You might also like