# Calculate integer summation when lower bound is a variable

How do you calculate the following sum?

\begin{equation*} \sum_{i=k}^n i \end{equation*}

-

$\sum_{i=k}^n i = \sum_{i=0}^n i - \sum_{i=0}^{k-1} i = \frac{1}{2} \left[ n(n+1) - (k-1)k \right]$