What exactly happens in the algebraic steps here? $$ \frac{n(n+1)}{2} + (n+1) = (n+1)(\frac{n}{2} + 1) = \frac{(n+1)(n+2)}{2} $$
I don't understand what happens from the first to the second and from the second to the third one.
 A: Note that $$\frac{n(n+1)}{2} = \frac{n}{2}(n+1)$$ so in the original expression, we have the sum of two terms both of which contain a factor of $(n+1)$. Taking this common factor out we obtain
$$\frac{n(n+1)}{2} + (n+1) = \frac{n}{2}(n+1) + 1(n+1) = (n + 1)\left(\frac{n}{2}+1\right)$$
which is the second expression. As for the third, note that we can rewrite the second factor by putting both terms over the same denominator as such
$$\frac{n}{2} + 1 = \frac{n}{2} + \frac{2}{2} = \frac{n+2}{2}$$
which gives
$$(n + 1)\left(\frac{n}{2}+1\right) = (n+1)\left(\frac{n+2}{2}\right) = \frac{(n+1)(n+2)}{2}.$$
A: For the first equality, $n+1$ is factored out. But it is easier if read from right to left:
$$
(n+1)\bigg(\frac{n}{2}+1\bigg) =  (n+1) \cdot \frac{n}{2}+ (n+1) \cdot 1 = \frac{n(n+1)}{2}+(n+1)
$$
For the second equality, the sum $\frac{n}{2}+1$ is evaluated:
$$
(n+1)\bigg(\frac{n}{2}+1\bigg) = (n+1)\bigg(\frac{n}{2}+\frac{2}{2}\bigg) = \frac{(n+1)(n+2)}{2}
$$
A: Try to think of it this way:
What if your first term was ${2(n+1)} + (n+1)$?
You would be left with $3(n+1)$ right?
We do the same thing here. In the first term we have $\frac{n}{2}$ lots of $(n+1)$, and we are adding 1 more.
This leaves us with $(\frac{n}{2}+1)(n+1)$ which is what happened in the first part.
The second part is simply taking a factor of 1/2 out of the first bracket.
$(\frac{n}{2}+1)(n+1) = \frac{1}{2}(2\times\frac{n}{2}+2\times1)(n+1) = \frac{(n+1)(n+2)}{2} $
