Added a new function to the primes lib; solved 10

I have the code for problem 10, what I don't have is the working library
to execute it in a decent amount of time. I need to change how I
calculate prime numbers, so that I generate them faster.