Implement factorize in module Primes