Refactor is_prime algorithm
Fermat's factorization method
Solution to Problem #3