Problem 5 completed. It produces the correct answer, however, it is currently extremely slow, taking almost a full minute to calcuate the answer. I'm sure there is a more efficent way to do this. So I will investigate and update as I learn more.