solution for #27 Quadratic primes