First you have to divide the number by 2. If the result is a whole number then the number is not a prime number. If the result is not an integer, then the number must be divided by the prime numbers 3 , 5 , 6 , 11, etc., respectively. If the result is not a whole number then the number is a prime number.