Second iteration for sum-of-multiples