Samplification of a sum of multiplication

143 Views Asked by At

Supposing I have the following sequence based on two indexes:

$a$ and $b$.

For $a$ starting with $1$ and $b$ starting with $5$ we have the following sum:

$$1 \cdot 5 + 2 \cdot 4 + 3 \cdot 3 + 4 \cdot 2 + 5 \cdot 1$$

i.e. $a$ is incremented from value $1$ till the value of $b$ and $b$ is decremented till the value of $a$. They are multiplied and the summed with the result of the previous multiplication.

Is there any short formula that permits me to get the same results for a much bigger range of $a$ and $b$?

2

There are 2 best solutions below

0
On

You should note that each term in the sum you gave adds up to $6$.

One way to rewrite the sum is $1(6-1)+2(6-2)+...$

So in general the general term of the sum will look like $k(n-k) $.

With $n$ fixed, which extreme values should $k$ take?

This should help you rewrite the sum with the regular $\sum$ symbol.

0
On

$$\begin{align} S(n)&=1\cdot n+2\cdot(n-1)+3\cdot(n-2)+\dots+(n-1)\cdot2+n\cdot1\\ &=\sum_{k=1}^{n}k(n+1-k)\\ &=\sum_{k=1}^{n}(nk+k-k^2)\\ &=\sum_{k=1}^{n}((n+1)k-k^2)\\ &=(n+1)\sum_{k=1}^{n}k-\sum_{k=1}^{n}k^2\\ &=\frac12n(n+1)^2-\frac16n(n+1)(2n+1)\\ &=\frac16n(n+1)(n+2). \end{align}$$