Euler problem solution #16