# Closed form expression for the sum of a product of binomials

I'm wondering if a closed form expression, not involving the hypergeometric function, exists for the following sum

$$\sum_{k=0}^{n}\binom{n}{k}\binom{q-k}{r}$$

where $q \geq n$, and $n,k,q,r$ are all non-negative integers, and $\binom{0}{r}=1$ if $r$ is $0$, and $0$ otherwise. It's not amenable to a Vandermonde convolution due to $k$ appearing in both the upper and lower indices, and upper negation has not proved useful. I could not find any related identities in Concrete Mathematics or in Henry W. Gould's collected identities involving binomial coefficients. If no closed form exists this information will also be valuable to me. Any hints or suggestions are greatly appreciated.

• According to Mathematica: $$\sum_{k=0}^{n}{n \choose k}{q-k \choose r} = {q \choose r}\,_{2}F_{1}\left(\left.-n, r-q \atop -q\right|-1\right)$$ – Thomas Russell Feb 11 '13 at 17:53
• @Shaktal: "not involving the hypergeometric function". – Keep these mind Feb 11 '13 at 17:56
• @Gugg well, Shaktal comments practically answers the question - in the negative. – leonbloy Feb 11 '13 at 18:31
• @leonbloy That's probably a fair point, but you'd need to know either something about (the inner workings and typical output of) Mathematica or a lot about the hypergeometric function. Which, for example, I do not. The same more or less applies to the current answer. I knew nothing about either Maxima or Gosper's algorithm, although I assume that the answer is useful to the OP. – Keep these mind Feb 11 '13 at 18:45