How do you list all the prime numbers between 80 and 90?
You evaluate the 5 odd numbers from 81 to 89.
In division testing you may skip
We don't have to test any further: 83 is prime
We don't have to test any further: 89 is prime
Note : We didn't have to test for the next prime 11, because if the number has a factor of 11 or higher, it also has a factor smaller than 11, and we would have found that. The highest prime you test for is smaller/equal to the square root of the number.
To list the prime numbers between
All even numbers are divisible 2, they are not prime. apart from
This leaves all the odd numbers.
A number ending in
If the sum of the digits is divisible by
As factors are always in pairs we only need to consider factors less than the square roots.