factoring big number N when it's generated incorrectly
improve factor_N2 performance by adding perfect square checking(gmpy2.iroot) before the square root calculation