 i is an iterator variable that goes from n to 2.As i is decremented in every iteration, the assumption (codice_16) is only true prior to the first iteration.The test is (codice_17) is only true after the last iteration of the loop (assuming i > 2).