3

What is the sum of this series ?

$(n-1)+(n-2)+(n-3)+...+(n-k)$

$(n-1)+(n-2)+...+3+2+1 = \frac{n(n-1)}{2}$

So how can we find the sum from $n-1$ to $n-k$ ?

Shobhit
  • 6,902
ammar
  • 297

3 Answers3

13

$$(n-1)+(n-2)\cdots(n-k)=\underbrace{n+n+\cdots +n}_{\text{$k$ copies}}-(1+2+\cdots k)=nk-\frac{k}{2}(k+1)$$

Nick Peterson
  • 32,430
Shobhit
  • 6,902
  • 1
    I edited your post to put the "underbrace" there; I think it makes this sort of thing more readable. If you don't like it, I won't be at all offended if you revert! – Nick Peterson Nov 08 '13 at 16:33
  • @NicholasR.Peterson Thanks for the edit. – Shobhit Nov 09 '13 at 02:11
  • In most cases that I encounter this, it's comparing all pairwise combinations in a set. EG A-Z (AB,AC, AD... AZ, BC, BD...) in this case, is k equal to n? – Adam Hughes Jul 18 '20 at 18:48
4

Hint:

Try writing: $$ \sum_{k=1}^{n-1}k=\sum_{k=1}^{n-k-1}k+\sum_{k=n-k}^{n-1}k. $$ Your formula allows you to find the first two sums; subtraction should do the rest!

Nick Peterson
  • 32,430
3

$ n k $ minus the sum from $1$ to $k$ equals

$$ n k - \frac12 k (k+1)$$

Ron Gordon
  • 138,521