Added Factorize function.  Works  up to 10^8 power.