factor: precompute and use a list of small primes as before.