# A three variable binomial coefficient identity

I found the following problem while working through Richard Stanley's Bijective Proof Problems (Page 5, Problem 16). It asks for a combinatorial proof of the following: $$\sum_{i+j+k=n} \binom{i+j}{i}\binom{j+k}{j}\binom{k+i}{k} = \sum_{r=0}^{n} \binom{2r}{r}$$ where $n \ge 0$, and $i,j,k \in \mathbb{N}$, though any proof would work for me.

I also found a similar identity in Concrete Mathematics, which was equivalent to this one, but I could not see how the identity follows from the hint provided in the exercises.

My initial observation was to note that the ordinary generating function of the right hand side is $\displaystyle \frac {1}{1-x} \frac{1}{\sqrt{1-4x}}$, but couldn't think of any way to establish the same generating function for the left hand side.

• LHS is $\sum\binom{i+j}i\binom{n-i}j\binom{n-j}i$. So the question about $\sum\binom{n-i}j\binom{n-j}i$ looks (somewhat) related. – Grigory M Dec 31 '14 at 19:02
• also triple product looks superficially similar to 3-variable form of Dixon / Strehl – Grigory M Jan 4 '15 at 12:47
• I now suspect that both sides count 00-avoiding $3n$-periodic binary sequences with exactly $n$ zeroes — maybe someone can prove it? – Grigory M Jan 7 '15 at 20:35
• I've also asked a (different but) related question @ MO – Grigory M Jan 9 '15 at 14:12
• @GrigoryM I believe the 00-avoiding $3n$-periodic binary sequences are a different sequence, counted by ${2n \choose n} + {2n-1 \choose n-1}$. In particular there are $30$ (not $29$) such sequences when $n = 3$. – 6005 Jan 9 '15 at 19:38

Restating your question, you are seeking to find the generating function of the left-hand-side: $$g(x) = \sum_{n=0}^\infty x^n \sum_{i+j+k=n}\binom{i+j}{i} \binom{j+k}{j} \binom{k+i}{k} = \sum_{i=0}^\infty \sum_{j=0}^\infty \sum_{k=0}^\infty x^{i+j+k} \frac{(i+j)! (i+k)! (j+k)!}{i!^2 j!^2 k!^2}$$ First, carry out summation over $i$: $$g(x) = \sum_{j=0}^\infty \sum_{k=0}^\infty x^{j+k} \frac{(j+k)!}{j!\cdot k!} {}_2F_1\left(1+j, 1+k; 1; x\right)$$ Now use Euler's transformation ${}_2F_1\left(1+j, 1+k; 1; x\right) = (1-x)^{-j-k-1} \, {}_2F_1\left(-j, -k; 1, x\right)$, which gives $$g(x) = \frac{1}{1-x} \sum_{j=0}^\infty \sum_{k=0}^\infty \left(\frac{x}{1-x}\right)^{j+k} \frac{(j+k)!}{j!\cdot k!} {}_2F_1\left(-j, -k; 1; x\right) = \\ \frac{1}{1-x} \sum_{j=0}^\infty \sum_{k=0}^\infty \left(\frac{x}{1-x}\right)^{j+k} \frac{(j+k)!}{j!\cdot k!} \sum_{r=0}^{\min(j,k)} \binom{j}{r}\binom{k}{r} x^r = \\ \frac{1}{1-x} \sum_{r=0}^\infty x^r \sum_{j=r}^\infty \sum_{k=r}^\infty \binom{k+j}{k} \binom{j}{r}\binom{k}{r} \left(\frac{x}{1-x}\right)^{j+k}$$ Using $$\sum_{j=r}^\infty \sum_{k=r}^\infty \binom{k+j}{k} \binom{j}{r}\binom{k}{r} z^{j+k} = \sum_{j=r}^\infty \binom{j}{r} z^{j+r} \sum_{k=0}^\infty \frac{(k+j+r)!}{j! r! k!} z^k =\\ \sum_{j=r}^\infty \binom{j}{r} z^{j+r} \binom{j+r}{j} \sum_{k=0}^\infty \frac{(j+r+1)_k}{k!} z^k = \sum_{j=r}^\infty \binom{j}{r} z^{j+r} \binom{j+r}{j} \left(1-z\right)^{-j-r-1} = \\ \frac{z^{2r}}{(1-z)^{2r+1}} \frac{1}{r!^2} \sum_{j=0}^\infty \frac{(j+2r)!}{j!} \left(\frac{z}{1-z}\right)^j = \frac{z^{2r}}{(1-z)^{2r+1}} \binom{2r}{r} \left(1-\frac{z}{1-z}\right)^{-1-2r} = \binom{2r}{r} z^{2r} \left(1-2z\right)^{-2r-1}$$ we continue: $$g(x) = \frac{1}{1-x} \sum_{r=0}^\infty x^r \binom{2r}{r} \left(\frac{x}{1-x}\right)^{2r} \left(1 - 2 \frac{x}{1-x} \right)^{-1-2r} = \\ \frac{1}{1-x} \sum_{r=0}^\infty \binom{2r}{r} \frac{1-x}{1-3x} \left(\frac{x^3}{(1-3x)^2}\right)^r = \\ \frac{1}{1-3x} \sum_{r=0}^\infty \binom{2r}{r}\left(\frac{x^3}{(1-3x)^2}\right)^r = \frac{1}{1-3x} \left(1 - 4 \frac{x^3}{(1-3x)^2}\right)^{-1/2} = \frac{1}{1-3x} \left( \frac{(1-4x)(1-x)^2}{(1-3x)^2}\right)^{-1/2} = \frac{1}{1-x} \frac{1}{\sqrt{1-4x}}$$ which is exactly the generating function of the right-hand-side: $$\sum_{n=0}^\infty x^n \sum_{r=0}^n \binom{2r}{r} \stackrel{n=r+k}{=} \sum_{k=0}^\infty x^r \sum_{r=0}^\infty \binom{2r}{r} x^r = \frac{1}{1-x} \cdot \frac{1}{\sqrt{1-4x}}$$

• Awesome solution! – Rijul Saini Jul 31 '12 at 19:21

Short summary: On the right we are summing the number of words of $r$ $a$s and $r$ $b$s over $0\le r\le n.$ Denote the set of words with $r$ $a$s and $r$ $b$s by $U_r.$ On the left we are computing the number of triples of words, the first with $i$ $a$s and $j$ $b$s, the second with $j$ $a$s and $k$ $b$s, the third with $k$ $a$s and $i$ $b$s, for all $i+j+k=n.$ Denote this set of triples $V_n.$

Let $(x,y,z)\in V_n.$ Define $(x,y,z)$ to be $0$-padded if $x$ does not end in $b$ or $y$ does not end in $a.$ Define $(x,y,z)$ to be $r$-padded if $(x,y,z)=(x'b^r,y'a^r,z)$ where $(x',y',z)\in V_{n-r}$ is $0$-padded.

Then any word $w\in U_r$ can be written in a unique way as $w=x'y'z$ where $(x',y',z)\in V_r$ is $0$-padded. (This is proved below.) Then $(x'b^{n-r},y'a^{n-r},z)\in V_n$ is $(n-r)-padded.$ This establishes a bijection between $V_n$ on the left, and $U_0\cup U_1\cup\ldots\cup U_n$ on the right, thereby proving the identity. The elements of $U_n$ correspond to $0$-padded elements of $V_n,$ the elements of $U_{n-1}$ correspond to $1$-padded elements of $V_n,$ and so on.

Detailed answer: The expression $\binom{2r}{r}$ counts words constructed from $r$ $a$s and $r$ $b$s. The sum on the right counts all such words of lengths ranging from $0$ to $2n.$

On the left, we have the product $\binom{i+j}{i}\binom{j+k}{j}\binom{k+i}{k},$ which counts all words constructed by concatenating a word with $i$ $a$s and $j$ $b$s to a word with $j$ $a$s and $k$ $b$s to a word with $k$ $a$s and $i$ $b$s. Such words contain $i+j+k$ $a$s and $i+j+k$ $b$s. The sum is over all $i+j+k=n,$ so these words all have $n$ $a$s and $n$ $b$s.

These observations hint at the possibility of a bijection, but a few questions arise:

1. Can any word of $n$ $a$s and $n$ $b$s be constructed by concatenating a word with $i$ $a$s and $j$ $b$s to a word with $j$ $a$s and $k$ $b$s to a word with $k$ $a$s and $i$ $b$s, for suitable $i,$ $j,$ $k$?
2. Is it possible for a word to be constructed in more than one way by such a procedure?
3. What about words of length less than $2n$?

Given a word $w$ of $n$ $a$s and $n$ $b$s, let's see if we can find $i+j+k=n,$ a word $x$ of $i$ $a$s and $j$ $b$s, a word $y$ of $j$ $a$s and $k$ $b$s, and a word $z$ of $k$ $a$s and $i$ $b$s such that $xyz=w.$ Observe that if such words can be found then $\lvert x\rvert=i+j\le i+j+2k=(j+k)+(k+i)=\lvert y\rvert+\lvert z\rvert.$ So $\lvert x\rvert\le n.$

We proceed by splitting $w$ into three, possibly empty, parts as follows: let $X$ consist of the first $P$ letters of $w,$ with $0\le P\le n,$ and let $I$ equal the number of $a$s in $X$ and $J$ the number of $b$s in $X$ (so that $I+J=P$). Let $K=n-I-J.$ Let $Z$ equal the string of letters from position $Q+1$ to $2n$ of $w,$ with $Q$ chosen so that $Z$ has $K$ $a$s. Note that $Q\ge P$ automatically holds: since the number of $a$s in $X$ is $I,$ the number of $a$s in the remainder of $w$ is $n-I\ge n-P=K.$ If $n-I>K,$ then there are $a$s to the right of $X$ and to the left of $Z$ and so $Q>P.$ If $n-I=K,$ then $J=0,$ and $X$ is simply a string of $I$ $a$s. So $Z$ contains all of the remaining $a$s and possibly some $b$s as well. Since $X$ contains no $b$s, we have $Q\ge P.$ So we may let $Y$ equal the string of letters from position $P+1$ to $Q$ of $w,$ giving $w=XYZ.$

So far we have that $I+J+K=n,$ that $X$ contains $I$ $a$s and $J$ $b$s, that $Z$ contains $K$ $a$s and $B:=2n-Q-K$ $b$s, and that $Y$ contains $n-I-K=J$ $a$s and $n-J-B$ $b$s. In order to obtain our desired partition of $w,$ we need $B=I.$ We claim that with suitable choices of $P$ and $Q,$ this can always be achieved.

To verify that this is so, we need to understand what happens as $P$ increases in steps of $1$ from $0$ to $n.$ To emphasize that $I,$ $J,$ and $K$ are functions of $P,$ we write $I(P),$ etc. We have already seen that there is always at least one possible value of $Q$ (and hence $B$) compatible with a given value of $P.$ There may, however, be more than one such compatible value, so we write $Q_l(P)$ and $Q_u(P)$ for the lower and upper bounds on $Q$ for a given $P.$ We have corresponding lower and upper bounds on $B,$ $$B_l(P)=2n-Q_u(P)-K(P)=n+P-Q_u(P)$$ and $$B_u(P)=2n-Q_l(P)-K(P)=n+P-Q_l(P).$$

When $P$ increases by $1,$ $K$ decreases by $1$: $K(P+1)=K(P)-1.$ If the letter of $w$ at position $P+1$ is $a$ then $I(P+1)=I(P)+1$ and $J(P+1)=J(P)$; if that letter is $b$ then $I(P+1)=I(P)$ and $J(P+1)=J(P)+1.$ Since $K(P)=n-P,$ the $K(P)^\text{th}$ $a$ from the right in $w$ is the $(P+1)^\text{st}$ $a$ from the left. Let $u$ be the position of the $P^\text{th}$ $a$ from the left in $w$ ($u=0$ if $P=0$) and let $v$ be the position of the $(P+1)^\text{st}$ $a$ from the left in $w$ ($v=2n+1$ if $P=n$). Then $Q_l(P)=u$ and and $Q_u(P)=v-1.$ In other words, if $\lvert X\rvert=P$ then $Z$ may start anywhere between the position immediately following the $P^\text{th}$ $a$ and the position of the $(P+1)^\text{st}$ $a.$ Notice that $Q_l(P+1)=v$ and therefore, that $Q_l(P+1)=Q_u(P)+1.$ This implies that $$B_u(P+1)=n+P+1-Q_l(P+1)=n+P+1-1-Q_u(P)=n+P-Q_u(P)=B_l(P).$$ Therefore, if $I(P)<B_l(P),$ then, since $I(P+1)$ is at most $I(P)+1,$ we have $I(P+1)\le B_u(P+1).$ On the other hand, $B_l(P)$ is non-increasing as $P$ increases from $0$ to $n,$ and ultimately equals $0.$ Therefore there must eventually be a $P$ such that $B_l(P)\le I(P)\le B_u(P).$ Once we find such a $P,$ we set $i=I(P),$ $j=J(P),$ $k=n-P,$ $x=X,$ $y=Y,$ $z=Z.$

Will this be the only solution? Not in general. Let there be a solution $(i,j,k,x,y,z)$ corresponding to a particular $P$ and $Q.$ If $y$ begins with $b$ and $z$ begins with $a$ then we get an additional solution by increasing both $P$ and $Q$ by $1.$ This results in the first $b$ of $y$ becoming the last letter of $x$ and the first $a$ of $z$ becoming the last letter of $y,$ which increases $j$ by $1$ and decreases $k$ by $1$ while leaving $i$ unchanged. The process obviously also works in reverse. There are no other ways to obtain additional solutions, for if the first letter of $y$ is $a,$ adding it to $x$ would force us to add a $b$ to $z,$ but $z$ cannot increase in length when $x$ increases in length.

In summary, all solutions for a particular word $w$ have the same $i.$ Equivalently, $\lvert y\rvert=j+k=n-i$ is the same for all solutions. The solution with minimum $j$ must be such that $x$ ends in $a$ or $y$ ends in $b.$ The solution with maximum $j$ must be such that $y$ begins with $a$ or $z$ begins with $b.$

Consider an example. Let $w=baabbbaaabab.$ Here $n=6.$ Then we have $$\begin{array}{ccc|ccc} P & I(P) & J(P) & K(P) & [B_l(P),B_u(P)] & [Q_l(P),Q_u(P)]\\ \hline 0 & 0 & 0 & 6 & [5,6] & [0,1]\\ 1 & 0 & 1 & 5 & [5,5] & [2,2]\\ 2 & 1 & 1 & 4 & [2,5] & [3,6]\\ 3 & 2 & 1 & 3 & [2,2] & [7,7]\\ 4 & 2 & 2 & 2 & [2,2] & [8,8]\\ 5 & 2 & 3 & 1 & [1,2] & [9,10]\\ 6 & 2 & 4 & 0 & [0,1] & [11,12] \end{array}$$ We get three solutions, corresponding to $(P,Q)=(3,7),$ $(4,8),$ $(5,9).$ These are \begin{aligned} &(i,j,k,x,y,x)=(2,1,3,baa,bbba,aabab),\\ &(i,j,k,x,y,x)=(2,2,2,baab,bbaa,abab),\\ &(i,j,k,x,y,x)=(2,3,1,baabb,baaa,bab). \end{aligned}

We have answered questions $1$ and $2$ in the affirmative. This suggests a way of producing a bijective proof of the identity. Let $W$ be the set of words of length at most $2n$ containing equal numbers of $a$s and $b$s. Let $S$ be the set of sextuples $(i,j,k,x,y,z)$ where $i,$ $j,$ $k$ are nonnegative integers satisfying $i+j+k=n,$ $x$ is a word consisting of $i$ $a$s and $j$ $b$s, $y$ is a word consisting of $j$ $a$s and $k$ $b$s, and $z$ is a word consisting of $k$ $a$s and $i$ $b$s. The map from $S$ to $W$ that simply concatenates $x,$ $y,$ and $z$ is not onto, since it only produces words of length $2n,$ and not one-to-one, as we have seen above. By modifying this simple concatenation map, we obtain a map that is both onto and one-to-one.

The map: Let $s=(i,j,k,x,y,z)\in S.$ If the last letter of $x$ is $b$ and the last letter of $y$ is $a,$ delete the last letter of both words. Repeat until $x$ or $y$ is empty or the last letter of $x$ is not $b$ or the last letter of $y$ is not $a.$ Denote the resulting words $x',$ $y'.$ We define $f:S\to W$ by $f(s)=x'y'z.$

The inverse map, applied to a word $w\in W$ with $N$ $a$s and $N$ $b$s, $0\le N\le n,$ is computed

1. by applying the algorithm described above to write $w=x'y'z,$ where $x'$ is a word with $i$ $a$s and $j'$ $b$s, $y'$ is a word with $j'$ $a$s and $k$ $b$s, $z$ is a word with $k$ $a$s and $i$ $b$s, $i+j'+k=N,$ and $j'$ is as small as possible,
2. by appending $n-N$ $b$s to $x'$ to form $x,$ appending $n-N$ $a$s to $y'$ to form $y,$ and
3. by forming the sextuple $(i,j'+n-N,k,x,y,z).$

Example from original answer: I've replaced my original answer with what I hope is a more convincing presentation, but this example from that answer may be helpful, so I leave it.

Suppose that $n=3.$ The right hand side enumerates the union of the following sets \begin{aligned} &\{e\},\\ &\{ab,ba\},\\ &\{aabb,abab,abba,baab,baba,bbaa\},\\ &\{aaabbb,aababb,aabbab,aabbba,abaabb,ababab,ababba,abbaab,abbaba,abbbaa,\\ &\ \ baaabb,baabab,baabba,babaab,bababa,babbaa,bbaaab,bbaaba,bbabaa,bbbaaa\}. \end{aligned} Here $e$ denotes the empty word. The left hand side enumerates words constructed as follows.

• Let $A$ be the set of words containing $i$ $a$s and $j$ $b$s. ($\lvert A\rvert=\binom{i+j}{i}$)
• Let $B$ be the set of words containing $j$ $a$s and $k$ $b$s. ($\lvert B\rvert=\binom{j+k}{j}$)
• Let $C$ be the set of words containing $k$ $a$s and $i$ $b$s. ($\lvert C\rvert=\binom{k+i}{k}$)

\begin{aligned} &(i,j,k)=(0,0,3),\ A=\{e\},B=\{bbb\},C=\{aaa\}:\\ &\ \longrightarrow\{bbbaaa\}\\ &(i,j,k)=(0,1,2),\ A=\{b\},B=\{abb,bab,bba\},C=\{aa\}:\\ &\ \longrightarrow\{babbaa,bbabaa,\dot{b}bb\dot{a}aa=bbaa\}\\ &(i,j,k)=(0,2,1),\ A=\{bb\},B=\{aab,aba,baa\},C=\{a\}:\\ &\ \longrightarrow\{bbaaba,b\dot{b}ab\dot{a}a=baba,\dot{b}\dot{b}b\dot{a}\dot{a}a=ba\}\\ &(i,j,k)=(0,3,0),\ A=\{bbb\},B=\{aaa\},C=\{e\}:\\ &\ \longrightarrow\{\dot{b}\dot{b}\dot{b}\dot{a}\dot{a}\dot{a}=e\}\\ &(i,j,k)=(1,0,2),\ A=\{a\},B=\{bb\},C=\{aab,aba,baa\}:\\ &\ \longrightarrow\{abbaab,abbaba,abbbaa\}\\ &(i,j,k)=(1,1,1),\ A=\{ab,ba\},B=\{ab,ba\},C=\{ab,ba\}:\\ &\ \longrightarrow\{ababab,ababba,a\dot{b}b\dot{a}ab=abab,a\dot{b}b\dot{a}ba=abba,baabab,baabba,babaab,bababa\}\\ &(i,j,k)=(1,2,0),\ A=\{abb,bab,bba\},B=\{aa\},C=\{b\}:\\ &\ \longrightarrow\{a\dot{b}\dot{b}\dot{a}\dot{a}b=ab,ba\dot{b}a\dot{a}b=baab,bbaaab\}\\ &(i,j,k)=(2,0,1),\ A=\{aa\},B=\{b\},C=\{abb,bab,bba\}:\\ &\ \longrightarrow\{aababb,aabbab,aabbba\}\\ &(i,j,k)=(2,1,0),\ A=\{aab,aba,baa\},B=\{a\},C=\{bb\}:\\ &\ \longrightarrow\{aa\dot{b}\dot{a}bb=aabb,abaabb,baaabb\}\\ &(i,j,k)=(3,0,0),\ A=\{aaa\},B=\{e\},C=\{bbb\}:\\ &\ \longrightarrow\{aaabbb\} \end{aligned} A dot over a letter indicates that the letter is to be deleted.

• Thank you! I'm awarding the bounty now — and will try to understand the proof later. – Grigory M Jan 9 '15 at 21:02
• I'm sorry to keep revising my answer. In the end, I think the bijection is fairly straightforward, and am a bit frustrated that the explanation is so cumbersome. Perhaps someone can produce a better explanation. – Will Orrick Jan 13 '15 at 15:11

Turns out, this indeed follows (relatively) directly from Strehl's identity.

Let's rewrite LHS in terms of $$i$$, $$k$$ and $$l=i+j$$: $$\text{LHS}= \sum_{l+k=n}\sum_{i=0}^l\binom li\binom{k+l-i}{l-i}\binom{k+i}i= \sum_{l+k=n}\sum_{i=0}^l(-1)^l\binom li\binom{-k-1}{l-i}\binom{-k-1}i;$$ application of Strehl's identity to the internal sum (in that post's notation, for $$n=-k-1$$, $$m=l$$) yields $$\sum_{l+k=n}\sum_i(-1)^l\binom{-k-1}i\binom li\binom{2i}l= \sum(-1)^{l-i}\binom{k+i}i\binom li\binom{2i}l= \sum(-1)^{l-i}\binom{k+i}i\binom i{l-i}\binom{2i}i;$$ the $$\binom{2i}i$$ terms suggests that we're almost there — and indeed what we've got is $$\sum_{i=0}^n\binom{2i}i\sum_j(-1)^j\binom{n-j}i\binom ij$$ and the internal sum is (always) equal to 1 by Vandermonde convolution. QED.

Remark. In principle, this is not that far from being bijective, since we have a bijective proof of Strehl's identity — but that proof works only for positive parameters...

• It would help if you would link to a version of Strehl's identity general enough for your use of it! – darij grinberg Sep 19 '15 at 1:08
• @darij why, I already do (see par. 3 of 'Comments and thoughts' there) – Grigory M Sep 19 '15 at 1:26
• Ah, that's the one you're referencing! – darij grinberg Sep 19 '15 at 1:33

The sum $$\sum_{p+q+r=n} {p+q\choose p} {p+r\choose r} {q+r\choose q}$$ with $$p,q,r\ge 0$$

is equal to $$\sum_{p=0}^n \sum_{q=0}^{n-p} {p+q\choose q} {p+n-p-q\choose p} {q+n-p-q\choose q}$$ which is $$\sum_{p=0}^n \sum_{q=0}^{n-p} {p+q\choose q} {n-q\choose p} {n-p\choose q}.$$

Re-write this as $$\sum_{0\le p,q\atop p+q\le n} {p+q\choose q} {n-q\choose p} {n-p\choose q}.$$

Introduce the integral representations $${n-q\choose p} = \frac{1}{2\pi i} \int_{|z_1|=\epsilon} \frac{1}{(1-z_1)^{p+1} z_1^{n-p-q+1}} \; dz_1$$ and $${n-p\choose q} = \frac{1}{2\pi i} \int_{|z_2|=\gamma} \frac{1}{(1-z_2)^{q+1} z_2^{n-p-q+1}} \; dz_2.$$

Observe carefully that these integrals are zero when $$p+q\gt n$$ so we may extend the summation in $$p$$ and $$q$$ to infinity.

We get for the sum $$\frac{1}{2\pi i} \int_{|z_1|=\epsilon}\frac{1}{(1-z_1) z_1^{n+1}} \frac{1}{2\pi i} \int_{|z_2|=\gamma}\frac{1}{(1-z_2) z_2^{n+1}} \\ \times \sum_{p,q\ge 0} {p+q\choose q} \frac{z_1^{p+q} z_2^{p+q}}{(1-z_1)^p (1-z_2)^q} \; dz_2 \; dz_1.$$

The inner term is $$\sum_{p\ge 0} \frac{z_1^p z_2^p}{(1-z_1)^p} \sum_{q\ge 0} {q+p\choose p} \frac{z_1^q z_2^q}{(1-z_2)^q} = \sum_{p\ge 0} \frac{z_1^p z_2^p}{(1-z_1)^p} \frac{1}{(1 - z_1 z_2 /(1-z_2))^{p+1}} \\ = \frac{1}{1 - z_1 z_2 /(1-z_2)} \frac{1}{1 - z_1 z_2 /(1-z_1)/(1 - z_1 z_2/(1-z_2))} \\ = \frac{1}{1 - z_1 z_2 /(1-z_2) - z_1 z_2 /(1-z_1)} \\ = \frac{(1-z_1)(1-z_2)}{(1-z_1)(1-z_2)-z_1 z_2 (2-z_1-z_2)} \\ = \frac{(1-z_1)(1-z_2)}{(1-z_1z_2)/(1-z_1-z_2)}.$$

Substituting this into the integral yields $$\frac{1}{2\pi i} \int_{|z_1|=\epsilon}\frac{1}{z_1^{n+1}} \frac{1}{2\pi i} \int_{|z_2|=\gamma}\frac{1}{z_2^{n+1}} \frac{1}{(1-z_1z_2)/(1-z_1-z_2)} \; dz_2 \; dz_1.$$

This is $$\frac{1}{2\pi i} \int_{|z_1|=\epsilon}\frac{1}{z_1^{n+1}}\frac{1}{1-z_1} \frac{1}{2\pi i} \int_{|z_2|=\gamma}\frac{1}{z_2^{n+1}} \frac{1}{(1-z_1z_2)/(1-z_2/(1-z_1))} \; dz_2 \; dz_1.$$

Extracting the inner residue now yields $$\frac{1}{2\pi i} \int_{|z_1|=\epsilon}\frac{1}{z_1^{n+1}}\frac{1}{1-z_1} \sum_{q=0}^n z_1^q \frac{1}{(1-z_1)^{n-q}} \; dz_1 \\ = \sum_{q=0}^n \frac{1}{2\pi i} \int_{|z_1|=\epsilon}\frac{1}{z_1^{n-q+1}} \frac{1}{(1-z_1)^{n+1-q}} \; dz_1 \\ = \sum_{q=0}^n \frac{1}{2\pi i} \int_{|z_1|=\epsilon}\frac{1}{z_1^{q+1}} \frac{1}{(1-z_1)^{q+1}} \; dz_1 .$$

This is $$\sum_{q=0}^n {q+q\choose q} = \sum_{q=0}^n {2q\choose q},$$ which was to be shown, QED.

Remark. For the geometric series to converge we may choose $$\epsilon=\gamma=1/3.$$ This gives the bound $$\frac{1}{3}\frac{1}{3}\frac{1}{2/3}$$ for the common ratio, which is $$\frac{1}{6}$$ and it goes through. We get for the common ratio of the second one that it is $$\frac{1}{3}\frac{1}{3}\frac{1}{2/3}\frac{1}{5/6} = \frac{1}{5}$$ and it goes through as well.