Solves for small. Needs a better way to determine primes. Modulus takes too long.