up previous next
find small prime factors of an integer
SmoothFactor(N: INT, MaxP: INT): RECORD
This function finds the small prime factors of an integer. It simply
tries dividing by all primes up to the given bound
The result is a list of the prime factors found together with the
unfactored part of
Be careful about supplying large values for
(e.g. greater than
a million) as the function could take a very long time.
From version 5.0.4 the field are called
to comply with the naming conventions.
record[factors := , multiplicities := , RemainingFactor := 25]
record[factors := [3, 3607], multiplicities := [2, 1], RemainingFactor := 3803]