Sum[Sum[Sum[1, {k, j + 1, n - 1}], {j, i + 1, n - 1}], {i, 0, n - 1}]