2

I saw this in a book and I don't understand it.

Suppose we have nonnegative integers $0 = k_0<k_1<...<k_m$ - why is it that $$\sum\limits_{j=k_i+1}^{k_{i+1}}1=k_{i+1}-k_i?$$

not all wrong
  • 16,178
  • 2
  • 35
  • 57

2 Answers2

2

In general, $$\sum_{k=m+1}^n 1=n-m$$

This is because $$\sum_{k=1}^m1=m$$ $$\sum_{k=1}^n 1=n$$ and $$\sum_{k=m+1}^n 1=\sum_{k=1}^n1-\sum_{k=1}^m1=n-m$$

Pedro
  • 122,002
2

Because $1+1+\cdots+1=n$ if there are $n$ ones.

So $j$ going from $k_i+1$ to $k_{i+1}$ is the same as going from $1$ to $k_{i+1}-k_i$ since the summand doesn't depend on $j$. There are $k_{i+1}-k_i$ ones in the list.

not all wrong
  • 16,178
  • 2
  • 35
  • 57