Worked on Project Euler, couln't finish