Why one needs to add 1 when substracting two indexes in order to get the number of elements between those two indexes? Why does one need to add 1 when substracting two indexes in order to get the number of elements between those two indexes?
For instance let's consider 4 boxes : |1|2|3|4|, between boxes number 2 and 4 one can count 3 boxes, yet 4-2=2. What causes this phenomenon?
 A: The subtraction counts the number of "hops" it takes to go from one box to the other, or equivalently the number of "bars" | between the two boxes. This is always one less than the number of boxes in that range.
A: Suppose that you have a sequence $a_1,a_2,\ldots\;$, and you want to know how many terms are strictly between $a_m$ and $a_n$, where $m<n$. From $a_1$ through $a_n$ is $n$ terms:
$$\overbrace{a_1,a_2,\ldots,a_m,a_{m+1},a_{m+2},\ldots,a_{n-1},a_n}^{n\text{ terms}}$$
The first $m$ of these are the $m$ terms from $a_1$ through $a_m$:
$$\overbrace{\color{crimson}{\underbrace{a_1,a_2,\ldots,a_m}_{m\text{ terms}}},a_{m+1},a_{m+2},\ldots,a_{n-1},a_n}^{n\text{ terms}}$$
Up through $a_n$ there must therefore be $n-m$ terms after $a_m$:
$$\overbrace{\color{crimson}{\underbrace{a_1,a_2,\ldots,a_m}_{m\text{ terms}}},\color{blue}{\underbrace{a_{m+1},a_{m+2},\ldots,a_{n-1},a_n}_{n-m\text{ terms}}}}^{n\text{ terms}}$$
But $a_n$ itself is not one of the terms strictly between $a_m$ and $a_n$: we want only the terms from $a_{m+1}$ through $a_{n-1}$, and there are only $n-m-1$ of them.
$$\overbrace{\color{crimson}{\underbrace{a_1,a_2,\ldots,a_m}_{m\text{ terms}}},\color{green}{\underbrace{a_{m+1},a_{m+2},\ldots,a_{n-1}}_{n-m-1\text{ terms}}},a_n}^{n\text{ terms}}$$
