In expansion of $(1+x+x^{2}+x^{3}+....+x^{27})(1+x+x^{2}+x^{3}+....x^{14})^{2}$ . Find the coefficient of $x^{28}$ I am not able to apply binomial theorem here
$(1+x+x^{2}+x^{3}+....+x^{27})(1+x+x^{2}+x^{3}+....x^{14})^{2}$ 
Please help me to find the coefficient of$ x^{28}$
Any help will be appreciated.
 A: It is convenient to use the coefficient of operator $[x^n]$ to denote the coefficient of $x^n$ in a series.

In order to determine the coefficient of $x^{28}$  we obtain
  \begin{align*}
\color{blue}{[x^{28}]}&\color{blue}{(1+x+\cdots+x^{27})(1+x+\cdots+x^{14})^2}\\
&=[x^{28}]\frac{1-x^{28}}{1-x}\cdot\frac{(1-x^{15})^2}{(1-x)^2}\tag{1}\\
&=[x^{28}]\frac{(1-x^{28})(1-2x^{15}+x^{30})}{(1-x)^3}\\
&=[x^{28}](1-2x^{15}-x^{28})\sum_{j=0}^\infty\binom{-3}{j}(-x)^j\tag{2}\\
&=\left([x^{28}]-2[x^{13}]-[x^0]\right)\sum_{j=0}^\infty\binom{j+2}{j}x^j\tag{3}\\
&=\binom{30}{2}-2\binom{15}{2}-\binom{2}{0}\tag{4}\\
&=435-210-1\\
&\color{blue}{\,\,=224}
\end{align*}

Comment:


*

*In (1) we apply the finite geometric series formula.

*In (2) we expand the numerator $(1-x^{28})(1-x^{15})^2$ and skip all terms with exponent greater $28$ since they don't contribute to the coefficient of $x^{28}$. We also apply the binomial series expansion

*In (3) we use the linearity of the coefficient of operator and apply the rule
$[x^{p-q}]A(x)=[x^p]x^qA(x)$. We also apply the binomial identity
\begin{align*}
\binom{-p}{q}=\binom{p+q-1}{q}(-1)^q
\end{align*}

*In (4) we select the coefficients accordingly.
A: Express is as a product of three factors $F_1,F_2,F_3$:
$$(1+x+x^{2}+x^{3}+....+x^{27})(1+x+x^{2}+x^{3}+....x^{14})^{2}=(1+\cdots +x^{27})(1+\cdots +x^{14})(1+\cdots +x^{14}).$$
Make up a table of powers of $x$:
$$\begin{array}{c|c|lcr}
m& n & \text{$F_1$} & \text{$F_2$} & \text{$F_3$} \\
\hline
& 1 & 14 & 14 & 0 \\
& \downarrow & \downarrow & \downarrow & \vdots \\
1 & 14 & 27 & 1 & 0 \\
& 1 & 13 & 14 & 1 \\
& \downarrow & \downarrow & \downarrow & \vdots \\
1 &15 & 27 & 0 & 1 \\
& 1 & 12 & 14 & 2 \\
&\downarrow & \downarrow & \downarrow & \vdots \\
2 &15 & 26 & 0 & 2 \\
&1 & 11 & 14 & 3 \\
&\downarrow & \downarrow & \downarrow & \vdots \\
3 & 15 & 25 & 0 & 3 \\
& 1 & 10 & 14 & 4 \\
& \downarrow & \downarrow & \downarrow & \vdots \\
4 & 15 & 24 & 0 & 4 \\
& 1 & 9 & 14 & 5 \\
& \downarrow & \downarrow & \downarrow & \vdots \\
5 & 15 & 23 & 0 & 5 \\
& \cdots & \cdots & \cdots & \cdots \\
& 1 & 0 & 14 & 14 \\
& \downarrow & \downarrow & \downarrow & \vdots \\
14 & 15 & 14 & 0 & 14 \\
\end{array}$$
Hence:
$$1\cdot 14 + 14\cdot 15=224.$$
A: The coefficients are bounded by $28 \cdot 15^2 = 6300$. So the following 
program that uses Python 3.6 integer arithmetic can be used to  find the solution
x=(((6301**29-1)*(6301**15-1)**2)//6300**3)
y=x%(6301**28)
z=y//6301**27
print(z)

It prints out
224

Python's operators:


*

*= is the assignment operator

** is the multiplication operator

*** is the exponentiation operator

*% is the remainder operator

*// is the integer division operator

A: \begin{eqnarray*}
(1+x+x^{2}+x^{3}+\cdots+x^{27})(1+x+x^{2}+x^{3}+\cdots+x^{14})^{2} \\
= (1+x+x^{2}+\cdots+x^{27}) (1+2x+3x^{2}+\cdots +14x^{13}+15x^{14} +14x^{15} \cdots +2x^{27}+ x^{28}) \\
= \cdots+x^{28}( \underbrace{1+2 +\cdots + 15}_{120} + \underbrace{14+ \cdots +2}_{104})+ \cdots 
\end{eqnarray*}
EDIT

A: If we multiply out $(1+x+x^2+\cdots+x^{14})^2$ but don't collect like terms yet, there will be $15^2=225$ terms, all with coefficient $1$ (and various exponents between $0$ and $28$).
Each of these $225$ terms can combine with exactly one of the terms of $1+x+x^2+\cdots+x^{27}$ to make $x^{28}$ -- except for $1\cdot 1$ which would need a $x^{28}$ term that isn't in $1+x+\cdots+x^{27}$.
So there are $225-1=224$ terms of $x^{28}$ to add up, giving $224x^{28}$.
