Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a closed form for the sum below?

$$\sum_{s=0}^{m-1} \sum_{t=0}^{m-1} s~t~(m-s)~(m-t)\left|s-t\right|$$

share|cite|improve this question

Yes, there is. Split the sum as follows: $$\sum_{s=0}^{m-1} \sum_{t=0}^{m-1} st(m-s)(m-t)\left\vert s-t\right \vert = \sum_{s=0}^{m-1} \left( \underbrace{\sum_{t=0}^{s} st(m-s)(m-t)(s-t)}_{\dfrac{s^2(s^2-1)(m-s)(2m-s)}{12}} + \underbrace{\sum_{t=s+1}^{m-1} st(m-s)(m-t)(t-s)}_{\dfrac{s((m-s)^2-1)(m-s)^2(m+s)}{12}} \right)$$ Now the summation over $s$ can again be evaluated since we need only sums of the form $\displaystyle \sum_{s=0}^{m-1} s^k$ where $k \in \{1,2,3,4,5,6\}$.

share|cite|improve this answer

Using maple I obtained the value of the sum as $$\frac{(m+2)(m+1)m(m-1)(m-2)(3m^2+1)}{420}.$$ This is more symmetric than I would have thought.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.