Euler problem programming