$a_n=1$, $a_n = a_{n-1} + n$ if $n \ge2$
How to prove (mathematically) that this recursive formula can be expressed as this nonrecursive formula?
$a_n=\frac{1}{2}n(n+1)$
$a_n=1$, $a_n = a_{n-1} + n$ if $n \ge2$
How to prove (mathematically) that this recursive formula can be expressed as this nonrecursive formula?
$a_n=\frac{1}{2}n(n+1)$
Simple induction would do.
Base case ($n=1$):
$a_1 = 1 = \frac{1}{2}\times1\times2$
Suppose the hypothesis holds for $n=k$, let's consider $n=k+1$:
$$\begin{align*} a_{k+1} &= a_k + k+1 \\ &=\frac{1}{2}\times k\times(k+1) + (k+1) \hspace{10mm}\text{(from our hypothesis)}\\ &=\frac{1}{2}\times k\times(k+1) + \bigg(\frac{1}{2}\times2\bigg)\times(k+1)\\ &=\frac{1}{2}\times (k+2)\times(k+1)\end{align*}$$