You give it the starting point, and you give it a list of primes which divide some numbers in the sequence after that starting point; it refactorises everything, it's just that the first method it uses is trial division by a set of primes known to include the factors, which is really quick.
And then having done the factorisation it computes sigma(n)n and continues.
