Test prime factorization