What is the simplified of this summation?

71 Views Asked by At

How can I simplify this equation into a single equation in terms of $n$?

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

2

There are 2 best solutions below

1
On BEST ANSWER

I can split the summation,

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

Now these two summations are equivalent,

$$2\sum_{k=0}^{n-2}{k(k+1)} = 2\sum_{k=0}^{n-2}{k^2 + k}=2 \left(\sum_{k=0}^{n-2}{k^2}+\sum_{k=0}^{n-2}{k} \right)=2 \left( \frac{(n-2)(n-1)}{2} + \frac{(n-2)(n-1)(2n-3)}{6} \right)$$

0
On

Although the problem has already been answered very nicely by OP and also by Daniel Fischer, here's a slightly different approach, using binomial coefficients, thus avoiding messy algebraic manipulations:

$$\begin{align} \sum_{k=0}^{n-2}[\underbrace{(n-k-1)}_{r+1}\underbrace{(n-k-2)}_r+k(k+1)]&=\sum_{r=0}^{n-2}r(r+1)+\sum_{k=0}^{n-2}k(k+1)\\ &=2\sum_{k=0}^{n-2}k(k+1)\\ &=4\sum_{k=0}^{n-2}{k+1\choose2}\\ &=4{[(n-2)+1]+1\choose 2+1}\\ &=4{n\choose3}\\ &=\frac23 n(n-1)(n-2)\qquad \blacksquare\end{align}$$