Number of collisions of one ball between two another balls May be you know about famous problem for its answer.

Place two billiard balls ($B_1$ and $B_2$) on the half-line $[0,\infty)$: the $B_1$ is at rest, the $B_2$ is to the right of it and is moving the left. At $x=0$ there is an elastic wall. Assume perfectly elastic collisions: the kinetic energy is preserved. How many collisions will happen depends on the masses of the ball, or rather their ratio. 

For more details see Here.

Let me change condition of this problem a bit.

Place two billiard balls ($B_1$ and $B_2$).
  Both are at rest. Next, place one more ball $B_0$ between $B_1$ and $B_2$ which moves to the ball $B_2$. Every collision is elastic:
   kinetic energy is preserved. The same question.

We can begin with simple case when masses of $B_1$ and $B_2$ are equal to $M$ and mass of $B_0$ is equal to $m$.

I tried to solve this and my result is a system of recurrences which 
I am not able to solve. I will post my solution below.
 A: Let us introduce some notations.
Notations
$M, m$ for mass of $B_1$ ($B_2$) and $B_0$ respectively.
$K$ for $\frac{M}{m}$
$V$ for velocity of $B_0$
$W$ for velocity of $B_1$ or $B_2$
$V_i$ for velocity of $B_0$ after $i$th collision.   

Next, it easy to get some helpful results. But firstly note that 
answer is not depends on initial value $V_0$ of $B_0$ therefore 
without loss of generality we can assume $V_0 = 1$. So, see, fig. 
$$W_1 = \frac{2}{1+K},\quad\text{i.e. velocity of $B_2$ after 1st collision}$$
$$V_1 = \frac{1-K}{1+K},\quad\text{i.e. velosity of $B_0$ after 1st collision}$$
$$W_2 = \frac{2}{1+K}\cdot V_1,\quad\text{i.e. velocity of $B_1$ after 2nd collision}$$
$$V_2 = \Bigl(\frac{1-K}{1+K}\Bigr)^2,\quad\text{i.e. velocity of $B_0$ after 2nd collision}$$
And so on. You get the point. We can write it in general:
\begin{align}
V_{i+1} &= (V_i - W_{i-1})\frac{1-K}{1+K} + W_{i-1}\\
W_{i+1} &= (V_i - W_{i-1})\frac{2}{1+K} + W_{i-1}
\end{align}
with initial conditions
$$V_0 = 1, W_{-1} = W_0 = 0$$
That's all. Obviously, that if for some $i$ it is fulfilled that
$$|V_i| \leq |W_{i-2}|$$
then process terminated. But how to know the first such $i$. I solved these recurrences numerically and this what I have got.

Where Theory is 
$$f(K) = \frac{\pi\sqrt{K}}{2\sqrt{2}}.$$
Where this function comes from? In paper mentioned by @sammygebril in comments 
similar problem solved. That result is two times bigger, i.e.
$$f(K) = \frac{\pi\sqrt{K}}{\sqrt{2}},$$
for $K\gg1$.
