I'd like to get Mathematica (11) to do basic sums, such as

Sum[Binomial[a, b - k] Binomial[c, d + k], {k, -d, b}].

This is the Chu-Vandermonde sum, which equals ${a+c\choose b+d}$, at least for integer $a,c$.

Mathematica instead evaluates the sum to

Binomial[a, b + d] Hypergeometric2F1[-c, -b - d, 1 + a - b - d, 1],

which is true, but not as useful.

My guess was, that I needed to somehow specify that $a,b,c,d$ were positive integers, or something, so I entered the following (BTW, is there an easier way to do this?)

$Assumptions =  a ∈ Integers && b ∈ Integers && c ∈ Integers && d ∈ Integers
                && a > 0 && b > 0 && c > 0 && d > 0

An evaluated the sum again, this time with a FullSimplify. However it didn't work, and I still got the hypergeometric representation.

Is this because Mathematica doesn't know the formula? Or is there some assumption I didn't tell it? The problem is not just with Vandermonde, but with many similar sums, which I think Mathematica should be able to put on a nice closed form, but for some reason it doesn't.


1 Answer 1


Add to the the assumptions that 1 + a > b + d

assume = Element[{a, b, c, d}, Integers] &&
   a > 0 && b > 0 && c > 0 && d > 0 && 1 + a > b + d;

expr = Sum[Binomial[a, b - k] Binomial[c, d + k], {k, -d, b}]

(*  Binomial[a, b + d] Hypergeometric2F1[-c, -b - d, 1 + a - b - d, 1]  *)

The additional assumption comes from requiring that the third argument of the Hypergeometric2F1 be a positive integer.

To eliminate the Hypergeometric2F1 use FunctionExpand

expr2 = Assuming[assume, expr //
    FunctionExpand // FullSimplify]

(*  (a + c)!/((a - b + c - d)! (b + d)!)  *)

Verifying that given the assumptions that this is equivalent to the Binomial

 expr2 == Binomial[a + c, b + d] // FullSimplify]

(*  True  *)

EDIT: Using a replacement rule to simplify

rule = (Times[Factorial[x_], Power[Factorial[y_], -1],
       Power[Factorial[z_], -1]] /; z == x-y) :> Binomial[x, z];


(*  Binomial[a+c, b+d]  *)
  • $\begingroup$ Thank you! That answered nearly all of my questions, including with regards to the assumption syntax :-) But why do we require that the third argument is a positive integer? mathworld.wolfram.com/GausssHypergeometricTheorem.html only seems to require $1 + a + c > 0$? Also, I assume there is no way to make Mathematica take the last step of reassembling the binomial? $\endgroup$ Commented Dec 20, 2016 at 19:11
  • 1
    $\begingroup$ @ThomasAhle - since you assumed that all variables are integers then 1+a-b-d is an integer. If it is not a positive integer then there will be a discontinuity unless either c or b+d has a smaller magnitude than the magnitude of 1+a-b-d. Rather than work out all the details I simplified the problem to 1 + a > b + d. To rewrite as a Binomial you would need to Simplify or FullSimplify with a custom ComplexityFunction $\endgroup$
    – Bob Hanlon
    Commented Dec 20, 2016 at 19:39
  • $\begingroup$ @Thomas, recall the definition of the Gaussian hypergeometric function, whose series at $0$ includes a Pochhammer symbol in the denominator. Since $(-j)_k=0,\,k>j>0$, hypergeometric functions do not admit these numbers as "denominator parameters". $\endgroup$ Commented Dec 21, 2016 at 1:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.