Distributed prime factorization