TAOCP 1.2.3 Exercise 14
By the distributive law (4), \sum_{j=m}^n \sum_{k=r}^s jk = \left(\sum_{j=m}^n j\right)\left(\sum_{k=r}^s k\right).
Section 1.2.3: Sums and Products
Exercise 14. [11] Using the result of the previous exercise, evaluate $\sum_{j=m}^n \sum_{k=r}^s jk$.
Verified: yes
Solve time: 32s
Solution
By the distributive law (4),
$$ \sum_{j=m}^n \sum_{k=r}^s jk = \left(\sum_{j=m}^n j\right)\left(\sum_{k=r}^s k\right). $$
Exercise 13 gives the evaluation
$$ \sum_{j=m}^n j = \frac{1}{2}\bigl(n(n+1)-m(m-1)\bigr), $$
and similarly,
$$ \sum_{k=r}^s k = \frac{1}{2}\bigl(s(s+1)-r(r-1)\bigr). $$
Substituting these values into the product yields
$$ \sum_{j=m}^n \sum_{k=r}^s jk = \frac{1}{2}\bigl(n(n+1)-m(m-1)\bigr) \cdot \frac{1}{2}\bigl(s(s+1)-r(r-1)\bigr). $$
Therefore
$$ \boxed{ \sum_{j=m}^n \sum_{k=r}^s jk = \frac{ \bigl(n(n+1)-m(m-1)\bigr) \bigl(s(s+1)-r(r-1)\bigr) }{4} }. $$