Phox
Well-known Member
- Joined
- Jul 26, 2004
- Messages
- 522
You could reduce the possible number of primes by looking at the last digit of the composite.
If it ends in 1, just search for primes ending in 1, 3, or 9
If it ends in 3, just search for primes ending in 1 or 7
If it ends in 7, just search for primes ending in 1 or 3
If it ends in 9, just search for primes ending in 1, 3, or 7
If it ends in 1, just search for primes ending in 1, 3, or 9
If it ends in 3, just search for primes ending in 1 or 7
If it ends in 7, just search for primes ending in 1 or 3
If it ends in 9, just search for primes ending in 1, 3, or 7