Source TeX:
\frac{1}{2}n(n-1)