Drastically reduce the search space

Don't check all potential divisors. Instead, only check 2, 3, and
integers of the form 6k+/-1. They're the only ones that can be prime
anyway.