Not that familiar with Python. However, you wrote Dixon's factorization method so it seems you know the basics.

Regards,
Jim