I was trying to understand why does binomial coefficient work and finally could find a formula, but first let me explain how I came up with that: Assume we have a box containing $5$ balls such that each ball has it's own unique number, we are going to choose $2$ of $5$ balls , in how many ways it can be done?
We can illustrate the balls with numbers from $1$ to $5$ (for simplicity): $1,2,3,4,5$
The all possible chooses are:
$$\left(\color{red}{1},2\right) ,\left(1,3\right),\left(1,4\right),\left(1,5\right) \tag{4 chooses}$$ $$\left(\color{red}{2},3\right),\left(2,4\right),\left(2,5\right) \tag{3 chooses}$$ $$\left(\color{red}{3},4\right),\left(3,5\right)\tag{2 chooses}$$ $$\left(\color{red}{4},5\right)\tag{1 chooses}$$
The number of chooses is $10$
From this simple example we conclude that if the numbers where from $1$ to $n$ then we had: $$\left(\color{red}{1},2\right),\left(1,3\right),\left(1,4\right),\left(1,5\right),...,\left(1,n\right)\tag{n-1 chooses}$$ $$\left(\color{red}{2},3\right),\left(2,4\right),\left(2,5\right),...,\left(2,n\right)\tag{n-2 chooses}$$ $$\left(\color{red}{3},4\right),\left(3,5\right),...,\left(3,n\right)\tag{n-3 chooses}$$ $$\left(\color{red}{4},5\right),...,\left(3,n\right)\tag{ n-4 chooses}$$ $$\vdots$$ $$\left(\color{red}{n-1},n\right)\tag{1 chooses}$$ Summing gives:
$$\left(n-1\right)+\left(n-2\right)+...+\left(2\right)+\left(1\right)=\frac{n\left(n-1\right)}{2}=\frac{n\left(n-1\right)\left(n-2\right)!}{2!\left(n-2\right)!}=\frac{n!}{2!\left(n-2\right)!}={{n}\choose{2}}$$
For another more difficult example assume we have a box containing $6$ balls such that each ball has it's own unique number, we are going to choose $4$ of $6$ balls from the box,again for simplicity we assume that the numbers on the balls are from $1$ to $6$, then we list these balls in a line with their numbers:
$1,2,3,4,5,6$
The all possible chooses are:
1,2,3,4 1,2,4,5 1,2,5,6
1,2,3,5 1,2,4,6
1,2,3,6
1,3,4,5 1,3,5,6
1,3,4,6
1,4,5,6
2,3,4,5 2,3,5,6
2,3,4,6
2,4,5,6
3,4,5,6
I used this very nice pattern to generalize the situation when we want to choose $4$ elements from a set with $n$ elements:
$$ \color{blue}{(1,2,3,4) \; \; \; \; \; (1,2,3,5) \; \;\; \;\; (1,2,3,6) \; \;\; \;\; (1,2,3,7) \; \; \; \;\; ... \; \;\; (1,2,3,n)}$$
$$ \color{blue}{(1,2,4,5) \; \; \; \; \; (1,2,4,6) \; \; \; \; \; (1,2,4,7) \; \; \; \; \; ... \; \; \; \; \; (1,2,4,,n)} $$
$$ \color{blue}{(1,2,5,6) \; \; \; \; \; (1,2,5,7) \; \; \; \; \; ... \; \; \; \; \; (1,2,5,,n)} $$
$$ \color{blue}{(1,2,6,7) \; \; \; \; \; ... \; \; \; \; \; (1,2,5,,n)} $$
$$\color{blue}{\vdots}$$
$$\color{blue}{(1,2,n,n-1)}$$
$$\color{blue}{(1,3,4,5) \; \; \; \; \; (1,3,4,6) \; \; \; \; \; (1,3,4,7) \; \; \; \; \; ... \; \; \; \; \; (1,3,4,n)}$$ $$\color{blue}{(1,3,5,6) \; \; \; \; \; (1,3,5,7) \; \; \; \; \; ... \; \; \; \; \; (1,3,5,n)}$$ $$\color{blue}{(1,3,6,7) \; \; \; \; \; ... \; \; \; \; \; (1,3,5,n)}$$ $$\color{blue}{\vdots}$$
$$\color{blue}{(1,3,n,n-1)}$$
$$\vdots$$$$\vdots$$ $$\vdots$$$$\vdots$$
$$\color{blue}{(1,n-3,n-2,n-1) \; \; \; \; \; (1,n-3,n-2,n)} $$
$$\color{blue}{(1,n-3,n-1,n)} $$
$$\color{blue}{(1,n-2,n-1,n)}$$ $$\underbrace{\text{Number of chooses}}_\textrm{$\sum_{k=1}^{n-3}k\left(n-\left(k+2\right)\right)$}$$
$$\color{red}{ (2,3,4,5) \; \; \; \; \; (2,3,4,6) \; \; \; \; \; (2,3,4,7) ... \; \; \; \; \; (2,3,4,n)}$$ $$\color{red}{ (2,3,5,6) \; \; \; \; \; (2,3,5,7) \; \; \; \; \; ... \; \; \; \; \; (2,3,5,n)}$$ $$\color{red}{ (2,3,6,7) \; \; \; \; \;... \; \; \; \; \; (2,3,6,n)}$$ $$\color{red}{ \vdots}$$ $$\color{red}{ (2,3,n,n-1)}$$
$$ \color{red}{ (2,4,5,6) \; \; \; \; \; (2,4,5,7) \; \; \; \; \; ... \; \; \; \; \;(2,4,n-1,n)}$$ $$\color{red}{ (2,4,6,7) \; \; \; \; \; ... \; \; \; \; \;(2,4,n-1,n)}$$$$\color{red}{ \vdots}$$ $$\color{red}{ (2,4,n-1,n)}$$
$$\vdots$$$$\vdots$$ $$\vdots$$$$\vdots$$
$$\color{red}{(2,n-3,n-2,n-1) \; \; \; \; \; (2,n-3,n-2,n)}$$
$$\color{red}{(2,n-3,n-1,n)}$$
$$\color{red}{(2,n-2,n-1,n)}$$
$$\underbrace{\text{Number of chooses}}_\textrm{$\sum_{k=1}^{n-4}k\left(n-\left(k+3\right)\right)$}$$
$$\color{green}{(n-4,n-3,n-2,n-1) \; \; \; \; \; (n-4,n-3,n-2,n)}$$
$$\color{green}{(n-4,n-2,n-1,n)}$$ $$\underbrace{\text{Number of chooses}}_\textrm{$\sum_{k=1}^{2}k\left(n-\left(k+\left(n-3\right)\right)\right)$}$$ $$(n-3,n-2,n-1,n)$$ $$\underbrace{\text{Number of chooses}}_\textrm{$\sum_{k=1}^{1}k\left(n-\left(k+\left(n-2\right)\right)\right)$}$$
Summing the elements with a same color gives us the number of chooses::
(n-3)+(n-4)+(n-5)+(n-6)...+1
(n-4)+(n-5)+(n-6)...+1
(n-5)+(n-6)+...+1
...
1
(n-3)+2(n-4)+3(n-5)+4(n-6)+...+(n-3)
(n-4)+2(n-5)+(n-6)+...+(n-4)
(n-5)+2(n-6)+...+(n-5)
...
1
$\vdots$
1
For example the first box tells us that in how many ways we can choose $4$ balls such that the ball with number $1$ is in all of the choices.(the balls are chosen based on their value, for example if we chosen a balls with number $1$ then our next choose should be a ball with a number greater than $1$, this explains why in the last step we just can fix the ball with number $n-4$)
Continuing this way finally the last box tells us in how many ways we can choose $4$ balls such that the ball with number $n-4$ is in all of the choices. Summing the all terms contained in each gray box we get:
$$\sum_{k=1}^{n-3}k\left(n-\left(k+2\right)\right)+\sum_{k=1}^{n-4}k\left(n-\left(k+3\right)\right)+...+\sum_{k=1}^{1}k\left(n-\left(k+\left(n-2\right)\right)\right)$$$$=\sum_{m=3}^{n-1}\sum_{k=1}^{n-m}k\left(n-\left(k+\left(m-1\right)\right)\right)$$$$=\sum_{m=3}^{n-1}\left[n\sum_{k=1}^{n-m}k-\sum_{k=1}^{n-m}k^{2}-\left(m-1\right)\sum_{k=1}^{n-m}k\right]$$$$=\sum_{m=3}^{n-1}n\frac{\left(n-m\right)\left(n-m+1\right)}{2}$$$$-\sum_{m=3}^{n-1}\left(2\left(n-m\right)+1\right)\frac{\left(n-m\right)\left(n-m+1\right)}{6}$$$$-\sum_{m=3}^{n-1}\left(m-1\right)\frac{\left(n-m\right)\left(n-m+1\right)}{2}$$$$=\sum_{m=3}^{n-1}\left[\frac{\left(n-m\right)\left(n-m+1\right)}{3!}\left(n-m+2\right)\right]$$$$=\sum_{m=3}^{n-1}\frac{\left(n-m+2\right)\left(n-m+1\right)\left(n-m\right)}{3!}\frac{\left(n-m-1\right)!}{\left(n-m-1\right)!}$$$$=\sum_{m=3}^{n-1}\frac{\left(n-m+2\right)!}{3!\left(n-m-1\right)!}=\sum_{m=0}^{n-4}{{n-m-1}\choose{3}}$$
This is equal to ${{n}\choose{4}}$ , but I don't know how to show that.
After deriving this formula I generalized that for the case when we want to choose $m$ objects from a set with cardinality $n$:
$$\color{red}{\sum_{m=0}^{n-k}{{n-m-1}\choose{k-1}}={{n}\choose{k}}}$$
Can someone prove this? (It would be nice if someone use index shifting such that the formula is defined when both $n,k=0$)
Also the formula is defined when both $n$ and $k$ are $\ge1$
PS...The pattern is more beautiful than I expressed and they actually makes a pine tree shaped pattern such that is every step starting with choosing a new ball fixing in all of the chooses the steps of the shape decreases till we finally just have one choose.