1

Evaluation of $\displaystyle \mathop{\sum\sum}_{1\leq i<j\leq n}(i-j)$

What I have done as

$\displaystyle \mathop{\sum\sum}_{1\leq i<j\leq n}(i-j)=\mathop{\sum\sum}_{1\leq i<j\leq n}i+\mathop{\sum\sum}_{1\leq i<j\leq n}j$

First I calculate

$\displaystyle \mathop{\sum\sum}_{1\leq i<j\leq n}i$

$\displaystyle =[1(1+1+\cdots (n-1)\ times+2(1+1+1+\cdots (n-2)\ times+3(1+1+\cdots (n-3)\ times+(n-1)\cdot 1]$

$\displaystyle =1(n-1)+2(n-2)+\cdots (n-1).1$

$\displaystyle=\sum^{n-1}_{r=1}r\cdot (n-r)=n\sum^{n-1}_{r=1}r-\sum^{n-1}_{r=1}r^2$

$\displaystyle =\frac{n^2(n-1)}{2}-\frac{(n-1)(n)(2n-1)}{6}$

$\displaystyle=\frac{n(n-1)}{2}[1-\frac{(2n-1)}{3}]=\frac{n(n+1)(n-1)}{6}$

But I did not know how do I solve

$\displaystyle \mathop{\sum\sum}_{1\leq i<j\leq n}j$

Help me

2 Answers2

2

It's really very similar. The sum over $j$ is $$\sum_{j=i+1}^n j=\frac{(n+i+1)(n-i)}{2}=\frac{n^2-i^2+n-i}{2}\ .$$ So you now need to do sums like $$\sum_{i=1}^n i^2\quad\hbox{and}\quad \sum_{i=1}^n i\ ,$$ both of which you have done in your question.

David
  • 82,662
  • Thanks David got it . Can you also please explain me how can I find using opening of summation like I have done in i part – Priti Bisht Jan 26 '23 at 06:44
2

It might be easier to not separate the terms and sum over $i$ first.

$$\sum_{j=1}^n\sum_{i=1}^j i-j = \sum_{j=1}^n \frac{j-j^2}{2} = \frac{n(n+1)}{4}-\frac{n(n+1)(2n+1)}{12}$$

Ninad Munshi
  • 34,407