| 1 | initial version |
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
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.