Euler 27 solution