Closed Form for Triangular Numbers

Theorem:

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

Plainly stated, this theorem tells us that the sum of the first $$n$$ natural numbers is equal to $$\frac{n(n+1)}{2}$$. It is a result that pops up frequently in fields as differing as calculus and computer science, and it is elegant in its simplicity.

Direct Proof
$$\sum_{i=1}^{n}i = 1 + 2 + ... + n$$.

Consider $$2\sum_{i=1}^{n}i$$ $$= 2(1 + 2 + ... + n)$$ $$= (1 + 2 + ... + n) + (1 + 2 + ... + n)$$ $$=(1 + n) + (2 + (n-1)) + ... + ((n-1) + 2) + (n + 1)$$ by commutativity and associativity. $$= (n + 1)_{1} + (n + 1)_{2} + ... + (n + 1)_{n}$$ $$= n(n+1)$$.

Therefore, $$2\sum_{i=1}^{n}i = n(n+1)$$ $$\implies \sum_{i=1}^{n}i=\frac{n(n+1)}{2}$$

QED

Proof by Induction
Base Case:$$n=1$$ When $$n=1$$, we have $$\sum_{i=1}^{1}i=1$$ Also, $$\frac{n(n+1)}{2}=\frac{1(2)}{2}=1$$ So the base case is true.

Induction Hypothesis:$$\sum_{i=1}^{k}i=\frac{k(k+1)}{2}$$ for $$k>1$$ Inductive Step: Consider $$n=k+1$$. By the properties of summation,$$\sum_{i=1}^{k+1}i=\sum_{i=1}^{k}i +k+1$$ Using the induction hypothesis this can be simplified to $$\frac{k(k+1)}{2} +k+1$$ $$=\frac{k(k+1)+2k+2}{2}$$ $$=\frac{k^2+3k+2}{2}$$ $$=\frac{(k+1)(k+2)}{2}$$ $$=\frac{(k+1)((k+1)+1)}{2}$$ Thus, the result has been shown by induction. Q.E.D.