Do primepower before trying qs
Add bigint type to simplify math.
Use it in new sieve code.
A few tweaks.  Add -1 as a possible factor.