# Proving generating functions equality.

I have an equation that looks like: $x_1+x_2+x_3+x_4+x_5+x_6 = n.$ ($n$ is a natural number ).

Let A be the number of solutions under these conditions: $x_1,x_3$ are even & $x_3 \le 20$. $x_6 \gt x_2+x_4$.

Let B be the number of solutions under these conditions: $x_1,x_2,x_3,x_4$ are even. $x_5 \ge 1.$ $x_6 \le 41.$

## I need to use generating functions in order to prove that A=B.

however, I am stuck with dealing with the case $x_6 \gt x_2+x_4.$ I thought of defining $a>0$ , so $x_6 = x_2+x_4+a$. but I dont know how to continue on from there.

Thanks.

Your idea of isolating $x_6-(x_2+x_4)$ is good; call this $x_7$, so that $x_6=x_2+x_4+x_7$. Then the original equation can be rewritten as

$$x_1+2x_2+x_3+2x_4+x_5+x_7=n$$

where $x_1,\ldots,x_5$ satisfy the original restrictions, and $x_7\ge 1$. If we set $y_2=2x_2$ and $y_4=2x_4$, this becomes

$$x_1+y_2+x_3+y_4+x_5+x_7=n\;,$$

where $x_1,y_2,x_3$, and $y_4$ are even and $x_3\le 20$, $x_5$ is unrestricted, and $x_7\ge 1$.

Each of $x_1,y_2$, and $y_4$ requires a factor of

$$\sum_{n\ge 0}z^{2n}=\frac1{(1-z^2)}\;,$$

$x_5$ requires a factor of

$$\sum_{n\ge 0}z^n=\frac1{1-z}\;,$$

and $x_7$ requires a factor of

$$\sum_{n\ge 1}z^n=\frac{z}{1-z}\;.$$

Finally, $x_3$ requires a factor of

$$\sum_{n=0}^{10}z^{2n}=\frac{1-z^{22}}{1-z^2}\;.$$

However, I don’t get quite the same generating function for B; are you sure that you stated all of the conditions correctly?