Added problem 47

This involved adding new functionality into the primes library for
getting prime factors