MathorynMathematical Formula Database

Sequences & Series

Sum of the First n Positive Integers

The sum 1+2+⋯+n1+2+\cdots+n equals the nn-th triangular number n(n+1)2\frac{n(n+1)}{2}. It is used to count handshakes, pairs and steps in algorithms, and is a special case of the arithmetic series formula.

∑k=1nk=n(n+1)2\sum_{k=1}^{n}k=\frac{n(n+1)}{2}
LaTeX\sum_{k=1}^{n}k=\frac{n(n+1)}{2}

Variables

nn
number of terms

Example

Sum the integers from 1 to 50.

  1. 50⋅512\frac{50\cdot51}{2}.

Answer: 12751275.

Related formulas