euler 31 solution