Solved Project Euler, problem #3.