# Bivariate generating function for squared binomial coefficients

I want to find a closed form to the bivariate generating function $$G(x, y) = \sum\limits_{i, j} \binom{i+j}{i}^2 x^i y^j.$$ Ideally, I would prefer a direct approach that is based on the definition above.

I know that there is a closed form here, as one can reduce the summation to Legendre polynomials: $$G(x, y) = \sum\limits_n y^n \sum\limits_k \binom{n}{k}^2 \left(\frac{x}{y}\right)^k = \sum\limits_n (y-x)^n P_n \left(\frac{y+x}{y-x}\right),$$ where $$P_n(x)$$ is the $$n$$-th Legendre polynomial. From this, using the generating function formula $$\sum\limits_n P_n(x) t^n = \frac{1}{\sqrt{1-2xt+t^2}},$$ we get the closed-form expression for $$G(x, y)$$ as $$\boxed{G(x, y) = \frac{1}{\sqrt{1-2(y+x)+(y-x)^2}}}$$ But I totally fail to see any meaningful way to derive it in a more direct and self-contained way. Any hints? And while we're at it, are there similar closed-form expressions for higher powers of $$\binom{n}{k}$$?

• Some possibly useful fact: $$1-2(y^2+x^2)+(y^2-x^2)^2 = (1-x-y)(1+x-y)(1-x+y)(1+x+y).$$ Meaning that $G(x^2, y^2)$ can be represented as $$G(x^2, y^2) = \frac{1}{\sqrt{(1-x-y)(1+x-y)(1-x+y)(1+x+y)}}.$$ Not sure if it helps though. Jun 11, 2023 at 15:52

$$G(t, x) = \frac{1}{\sqrt{1-2xt+t^2}} = \sum\limits_k \frac{t^k(2x-t)^k}{4^k}\binom{2k}{k}.$$ If we want to extract the coefficient near $$t^n$$, we get $$[t^n] G(t, x) = \frac{1}{2^n}\sum\limits_k \binom{2k}{k} \binom{k}{n-k} (-1)^{n-k} x^{2k-n},$$ where $$k$$ goes from $$\lceil n/2 \rceil$$ to $$n$$. Changing $$k \to n-k$$, we get $$[t^n] G(t, x) = \frac{1}{2^n} \sum\limits_k (-1)^k \binom{2n-2k}{n-k} \binom{n-k}{k} x^{n-2k}.$$ On the other hand, $$\binom{2n-2k}{n-k}\binom{n-k}{k}=\binom{2n-2k}{n-k,k,n-2k}=\binom{2n-2k}{n}\binom{n}{k},$$ which gives one of the standard expressions $$[t^n] G(t, x) =\boxed{ \frac{1}{2^n} \sum\limits_k (-1)^k \binom{n}{k}\binom{2n-2k}{n} x^{n-2k}}$$
Now, we need to connect the dots. To make it relevant to $$\binom{n}{k}^2$$, we define Legendre polynomials as $$P_n(x) = \frac{1}{2^n} \sum\limits_{k=0}^n \binom{n}{k}^2(x-1)^{n-k} (x+1)^k.$$ It's easy to check that it compacts into $$P_n(x) = [t^n] \frac{(t+x-1)^n(t+x+1)^n}{2^n} = [t^n] \frac{((t+x)^2-1)^n}{2^n}.$$
We can now expand it back to get the same expression: $$[t^n]\frac{((x+t)^2-1)^n}{2^n} = [t^n]\frac{1}{2^n}\sum\limits_k (-1)^k \binom{n}{k}(x+t)^{2n-2k} =\boxed{ \frac{1}{2^n} \sum\limits_k (-1)^k \binom{n}{k}\binom{2n-2k}{n} x^{n-2k}}$$ I still don't like this approach, as I needed to know $$G(t, x)$$ in advance to justify it, and it's quite far from being direct in terms of the genfunc for $$\binom{n}{k}^2$$, but I suppose it's still nice to have proofs that are directly based on binomial identities, rather than physics...
Ok, after some more thought I figured out how to work with $$\binom{n}{k}^2$$ directly. Consider $$Q_n(x, y) = \sum\limits_{k=0}^n \binom{n}{k}^2 x^k y^{n-k} = [t^n] (x+t)^n (y+t)^n.$$ We need to sum it up over all $$n$$, and we already know that $$Q_n(x) = (y-x)^n P_n(\frac{y+x}{y-x})$$.
But let's analyze $$Q_n(x, y)$$ on its own: $$[t^n](x+t)^n (y+t)^n = [t^n](t(t+x+y)+xy)^n$$ This expands into $$\sum\limits_k \binom{n}{k} x^k y^k [t^k] (t+x+y)^{n-k} = \sum\limits_k \binom{n}{k} \binom{n-k}{k} x^k y^k (x+y)^{n-2k}.$$ Note that $$\binom{n}{k} \binom{n-k}{k} = \binom{n}{k, k, n-2k} = \binom{n}{2k} \binom{2k}{k},$$ hence we want to compute the sum $$\sum\limits_{n, k} \binom{n}{2k} \binom{2k}{k} x^k y^k (x+y)^{n-2k}.$$ Let's sum up over $$n$$ for each fixed $$k$$: $$\sum\limits_{n} \binom{n}{2k} (x+y)^{n-2k} = \sum\limits_{t} \binom{2k+t}{2k} (x+y)^{t} = \frac{1}{(1-x-y)^{2k+1}}.$$ Thus, we want to compute $$\sum\limits_k \binom{2k}{k} \frac{x^k y^k}{(1-x-y)^{2k+1}}.$$ On the other hand we know that $$\sum\limits_k \frac{x^k}{4^k} \binom{2k}{k} = \frac{1}{\sqrt{1-x}},$$ thus the sum above compacts into $$\frac{1}{1-x-y} \frac{1}{\sqrt{1-4\frac{xy}{(1-x-y)^2}}}= \frac{1}{\sqrt{(1-x-y)^2-4xy}},$$ which then expands into the same expression in the denominator.