Project Euler 35 complete - Memory hog