Added problem 8 solution
Improved prime number generator