Project  Euler problem 12