Euler problem 46 solved