Project euler problem 4