Problem 3.

I tried a few more functional style implementations of the factors
function but without success with an input this large.