Revision history [back]

There a two ways to avoid calculating all prime divisors. Firstly, look at "trial_division". It gives the first prime divisor.

trial_division(13*97)
13


Secondly, you can use n.factor(limit=yoursearchlimit).

(13*97*191).factor(limit=50)
13 * 18527