Changed primes calculation to library import