sum sum (j - i + 1), j = i to n - 1, i = 0 to n - 1