Initial implementation for calculating prime factors. It is too slow to do prime sieve for 770k numbers.