Faster calculation of divisors, using cofactor