Compute prime factors of a number in logarithmic time after computing sieve.
C++
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
README.md
prime_factors.cc

README.md

prime-factors

Compute prime factors of a number in logarithmic time after computing sieve. The algorithm computes for each number a in the range [2..N) the lowest prime factor of a. Factorizing a number then becomes just repeated division by these lowest factors.