Project Euler, Problem 7 Mathematica