@thilinarmtb --- can you implement this algorithm? Just loop over all odd integers, or use `mpz_nextprime` or something like that. Just a very simple algorithm, so that we can use `factor()` even if ECM is not installed, it will just be slow for larger integers.