Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How do you persuade Mathematica to give simple identities involving binomial sums. For example


where n is bigger than both a and b.

share|improve this question
up vote 3 down vote accepted

Use Assumptions to get the result you expected.

In[1]:= $Assumptions = 
 n > a > 0 && n > b > 0 && a \[Element] Integers && b \[Element] Integers;

In[2]:= Sum[Binomial[a, i]*Binomial[b, i], {i, 0, n}]
Out[2]= Gamma[1 + a + b]/(Gamma[1 + a] Gamma[1 + b])

In[3]:= FullSimplify[%]
Out[3]= (a + b)!/(a! b!)

Note that it does give a generally valid result without these assumptions too. Here the assumptions helped us obtain a simpler result. I used the $Assumptions global variable here to avoid typing the assumptions twice, for Sum and FullSimplify.

share|improve this answer
Thank you. Out of interest, can it persuaded to give Binomial[a+b,a] as the output? – Anush Jan 31 '14 at 20:34
@Anush I don't know if it can do that automatically. As you see, FullSimplify doesn't. – Szabolcs Jan 31 '14 at 20:36
@Anush: If that particular result for this particular case is the desired end result, you can use something like Assuming[n > a > 0 && n > b > 0 && {a, b} \[Element] Integers, FullSimplify[ Sum[Binomial[a, i]*Binomial[b, i], {i, 0, n}]]] /. (x_ + y_)!/(x_! y_!) :> Binomial[x + y, x] to get it. – ciao Feb 1 '14 at 0:41

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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