# Calculate integer summation when lower bound is a variable

How do you calculate the following summation? $\sum_{i=k}^n i$

-

$\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]$