I am solving reccurent equation
$a_{n+1} = a_{n} + n + 1$
where a1 = 2.
which we can rewrite as
$a_{n} = a_{n-1} + n -1 + 1$
we can "expand" it such as
$ =a_{n-2} + n - 2 + 1 + n - 1 + 1$ $=a_{n-3} + n - 3 + 1 + n - 2 + 1 + n - 1 + 1$
we see that this is basicly sum of ( n - 1 ) to ( n - k ) , where k = n - 1.
Also we see , that 1 is added n - 1 times.
The formula according "Rules" i wrote should look like
$(\sum_{i=1}^{n-1}i ) + n - 1 $
===============================
which we can rewrite as
$\frac{n^{2}+n-2}{2}$
but the correct answer according to wolfram should be
$\frac{n^{2}+n+2}{2}$
Which indicates that my though process was wrong. Where did i make mistake which lead to wrong result? Thanks
You correctly established that $a_i-a_{i-1}=i$. This relation holds for $i\geq 2$.
On the other hand you did not consider that $a_1=2$. In fact $$a_n=a_1+\sum_{i=2}^n (a_{i}-a_{i-1})=2+\sum_{i=2}^n i =2+\frac{n(n+1)}{2}-1=\frac{n^2+n+2}{2}.$$