6.2.2 Example 2

In this example we will show you how to use the DistributedFactor class that comes built-in with dsage. DistributedFactor attempts to factor numbers by using a combination of the ECM and the QSieve algorithm, as well as trial factorization for small factors.

  1. Run d = dsage.start_all() if you have not started your dsage session yet, otherwise you can continue to use the previous d instance.
  2. Start the distributed factoring job with factor_job = DistributedFactor(d, number). You can pick fairly large values, try for example $ 2^{360}-1$ . You can see whether or not the factoring job is done by looking at the factor_job.done attribute. When it is done, you can look at the prime factors it found by inspecting factor_job.prime_factors.

See About this document... for information on suggesting changes.