How does $\sum_{k=j}^{i+j}(i+j-k)$ = $\sum_{k=1}^{i}(k)$ I am working with summations and I came across these two equivalent summations
$\sum_{k=j}^{i+j}(i+j-k)$ = $\sum_{k=1}^{i}(k)$ but there is no explanation as to how the latter summation was computed from the former.
 A: The first sum:
$$\begin{align}\sum_{k=j}^{i+j}i+j-k&=(i+j-(j))+(i+j-(j+1))+(i+j-(j+2))+\cdots+(i+j-(i+j))\\&=i+(i-1)+(i-2)+\cdots+0\end{align}$$
Which, if you reverse the order (which is fine since addition is commutative here):
$$=\sum_{k=1}^ik$$
A: $$\sum_{k=j}^{i+j}(i+j-k)=(i+j-j)+(i+j-(j+1))+(i+j-(j+2))\\+\ldots+(i+j-(i+j))=i+(i-1)+(i-2)+\ldots+0$$
A: We obtain
\begin{align*}
\color{blue}{\sum_{k=j}^{i+j}(i+j-k)}&=\sum_{k=0}^{i}(i-k)\tag{1}\\
&=\sum_{k=0}^i k\tag{2}\\
&\,\,\color{blue}{=\sum_{k=1}^i k}\tag{3}
\end{align*}
Comment:

*

*In (1) we shift the index $k$ of the right-hand sum by $j$ to start with $k=0$. In order to compensate this index shift we have to substitute $k\to k+j$.


*In (2) we change the order of summation $k\to i-k$.


*In (3) we skip the first term $k=0$ which does not contribute to the sum.
A: Express the sum as:
$$\sum_{k=j}^{i+j}(i+j-k)=\sum_{k=j}^{i+j}(i-(k-j))$$
Change the bound:
$$\begin{align}k&=j,j+1,j+2,...,j+i-1,j+i \Rightarrow \\
k-j&=0,1,2,...,i \end{align}$$
Hence:
$$\sum_{k=j}^{i+j}(i-(k-j))=\sum_{k-j=0}^{i}(i-(k-j))=\sum_{t=0}^{i}(i-t)$$
Change the bound:
$$\begin{align}t&=0,1,...,i \Rightarrow \\
-t&=0,-1,...,-i \Rightarrow\\
i-t&=i,i-1,...,0\\
i-t&=0,1,2,...,i-1,i
\end{align}
$$
Hence:
$$\sum_{t=0}^{i}(i-t)=\sum_{i-t=0}^{i}(i-t)=\sum_{k=0}^{i}k=\sum_{k=1}^{i}k.$$
A: More abstractly, this is an instance of
$$
\sum_{k={\rm start}}^{\rm finish} {\rm finish} - k = \sum_{k=1}^{\rm finish-start} k
$$
As $k$ runs from start to finish, the LHS visits all integers from finish-start down to zero, in decreasing order. So does the RHS, except that the RHS has one fewer term (it omits zero), and the RHS visits in increasing order.
