Coefficient of Generating Function

Determine the coefficient of $$~x^n~$$ in:

$$(x^2 + x^4 + x^6 + ... + x^{n-1})(x + x^3 + x^5 + ... + x^{n-2})$$

Where $$~n~$$ is an odd number.

How to describe the possible combinations of coefficients that result in $$~x^n~$$?

One way is directly, each term left-to-right in the left product must be associated with the corresponding right-to-left term in the right product, giving a total of one product for each element, hence $$(n-1)/2$$.

• Is there any more algebraic method? Jun 26, 2019 at 17:12
• @gmn_1450 Certainly, but why use a more difficult method? This is similar to the insight Gauss used to quickly sum the whole numbers from $1$ to $100$.
– amd
Jun 26, 2019 at 19:37

We use the coefficient of operator $$[x^m]$$ to denote the coefficient of $$x^m$$ of a series.

We consider odd $$n=2m+1$$ and obtain \begin{align*} \color{blue}{[x^{2m+1}]}&\color{blue}{\left(x^2+x^4+\cdots+x^{2m}\right)\left(x^1+x^3+\cdots+x^{2m-1}\right)}\\ &=[x^{2m+1}]\sum_{j=1}^mx^{2j}\sum_{k=1}^{m}x^{2k-1}\\ &=\sum_{j=1}^m[x^{2m+1-2j}]\sum_{k=1}^mx^{2k-1}\tag{1}\\ &=\sum_{j=1}^m[x^{2j-1}]\sum_{k=1}^mx^{2k-1}\tag{2}\\ &=\sum_{j=1}^m1\tag{3}\\ &\,\,\color{blue}{=m} \end{align*}

Comment:

• In (1) we apply the rule $$[x^{p-q}]A(x)=[x^p]x^qA(x)$$.

• In (2) we change the order of summation $$j \to m-j+1$$.

• In (3) we select the coefficient of $$x^{2j-1}$$.