##### Updated on May 28, 2019

# Sum of the first \(n\) integers

\(1 + 2 + 3 + ... + n = \)

$$\sum_{k=1}^n k = \frac{1}{2}n(n+1)$$

Use cases: Finding a missing number from \(1 ... n\)

# Sum of the squares of the first \(n\) integers

\(1^2 + 2^2 + 3^2 + ... + n^2 = \)

$$\sum_{k=1}^n k^2 = \frac{1}{6}n(n+1)(2n+1)$$