silverpig
Lifer
- Jul 29, 2001
- 27,703
- 12
- 81
Well you can definitely rule out any numbers that end in a multiple of 2, any numbers where the sum of the digits add up to a number divisible by 3, any numbers ending in 5... That leaves you only having to test numbers that end in 3, 7, or 9. Do a test right away to see if the number in question ends with one of these numbers. If it does, test it further, if not, chuck it.