# Thread: Closed form of sum

1. ## Closed form of sum

Hi,

I was just playing around end ended up trying to find a closed form of the following sum,
$
\sum^{n-1}_{i=1} i(n-i)$

Writing it out I get,

$1(n-1)+2(n-2)+3(n-3)+\cdots+ (n-1)(1)$

which is,

$2(n-1)+2(n-2)+3(n-3)\cdots+ (n-2)(2)$

which is,

$2(n-1)+4(n-2)+3(n-3)\cdots (n-3)(3)$ and so on...

I'm not sure what to make of this though. Could someone help me out finding a closed form for this sum?

2. This can be calculated using the formula for the sum of numbers from 1 to n (arithmetic progression) and the sum of squares. (There is also a formula for the sum of cubes -- the first that popped up in a search.)

3. Originally Posted by emakarov
This can be calculated using the formula for the sum of numbers from 1 to n (arithmetic progression) and the sum of squares. (There is also a formula for the sum of cubes -- the first that popped up in a search.)
Just to elaborate a bit (maybe you don't need it, but could be useful for others looking at the thread),

$\displaystyle \sum^{n-1}_{i=1} i(n-i)=\sum^{n-1}_{i=1} (in-i^2) = n\sum^{n-1}_{i=1}i - \sum^{n-1}_{i=1} i^2$

4. Hello, Mollier!

I was just playing around end ended up trying to find

a closed form of the following sum: . $\displaystyle \sum^{n-1}_{i=1} i(n-i)$

$\displaystyle n=2\!:\;\sum^1_{i=1}i(2-i) \;=\;1\cdot1 \:=\:1$

$\displaystyle n = 3\!:\;\sum^2_{i=1}i(3-i) \;=\;1\cdot2 + 2\cdot1 \;=\;4$

$\displaystyle n-4\!:\;\sum^3_{i=1}i(4-i) \;=\;1\cdot3 + 2\cdot2 + 3\cdot1 \;=\;10$

$\displaystyle n-5:\;\sum^4_{i=1}i(5-i) \;=\;1\cdot4 + 2\cdot3 + 3\cdot2 + 4\cdot1 \;=\;20$

$\displaystyle n = 6\!:\;\sum^5_{i=1}i(6-i) \;=\;1\cdot5 + 2\cdot4 + 3\cdot3 + 4\cdot2 + 5\cdot1 \;=\;35$

$\displaystyle n=7\!:\;\sum^6_{i=1}i(7-i) \;=\;1\cdot6+ 2\cdot5+ 3\cdot4 + 4\cdot3 + 5\cdot2 + 6\cdot1 \;=\;56$

The sequence: . $1,\:4,\:10,\:20,\:35,\:56,\:\hdots$ are Tetrahedral Numbers.

They are the number of balls in a triangular pyramid of balls.
You must imagine these triangles "stacked up".

$n = 2\qquad \begin{array}{c}\circ \end{array}$

$n = 3 \qquad \begin{array}{c} \circ\end{array} \quad \begin{array}{c} \circ \\ [-3mm] \circ \circ \end{array}$

$n = 4 \qquad \begin{array}{c}\circ\end{array} \quad \begin{array}{c}\circ \\ [-3mm] \circ\circ\end{array} \quad \begin{array}{c}\circ \\ [-3mm] \circ\circ \\ [-3mm]\circ\!\circ\!\circ\end{array}$

$n = 5\qquad\begin{array}{c}\circ\end{array} \quad \begin{array}{c}\circ \\ [-3mm] \circ\circ\end{array} \quad \begin{array}{c}\circ \\ [-3mm] \circ\circ \\ [-3mm]\circ\!\circ\!\circ\end{array} \quad \begin{array}{c}\circ \\ [-3mm] \circ\circ \\ [-3mm] \circ\!\circ\!\circ \\ [-3mm]
\circ\!\circ\!\circ\circ \end{array}$

The $n^{th}$ term is this sequence is: . $a_n \:=\:\dfrac{(n-1)n(n+1)}{6}$

5. That is just wonderful guys, thank you!