I asked how to calculate $$\sum_{i = 0}^b(-1)^i\binom{b}{i}\binom{a+b-i-1}{a-i}$$ and got amazing answers. A bit later, however, I figured I needed something rather more complicated: I need to find the value of $$\sum_{i = 0}^k(-1)^i\binom{b}{i}\binom{a+b-i-1}{a-i},$$ where $k$ can be any integer between $0$ and $b$. Is there any closed formula for that?
1 Answer
$\begingroup$
$\endgroup$
1
WolframAlpha claims it is $$\frac{(-1)^{k + 1} (k + 1) (-a - b + k + 1) \binom{b}{k + 1} \binom{a + b - k - 2}{a - k - 1}}{a b},$$ and you can absorb the $k+1$ and $b$, yielding $$\frac{(-1)^{k+1} (-a - b + k + 1) \binom{b-1}{k} \binom{a + b - k - 2}{a - k - 1}}{a}.$$ A little simpler: $$\frac{(-1)^k b \binom{b-1}{k} \binom{a + b - k - 1}{b}}{a}.$$
-
$\begingroup$ Nice! I wasn't aware of the fact that WolframAlpha did such kind of calculation. Once we have the formula, it can be shown by induction. Thank you, @RobPratt! $\endgroup$ Commented Nov 16, 2020 at 20:36
Sum[(-1)^i*Binomial[b, i]*Binomial[a + b - i - 1, a - i], {i, 0, k}]
results in $$\frac{(-1)^{k+1} (k+1) (-a-b+k+1) \binom{b}{k+1} \binom{a+b-k-2}{a-k-1}}{a b} $$ $\endgroup$