Optimize problem 7

Completely new solution. All prime numbers above 3 can be written as
6k+1 or 6k-1, where k is any integer. We only need to check numbers that
satisfy that expression for possible primes.