sum of i, i = 0 to n