On an expansion of $(1+a+a^2+\cdots+a^n)^2$

(Don't forget, the square eventually stops, and so you get a diamond shape at the end)

enter image description here


Just multiply as,

$$1(1+a+a^2...+a^n)$$ $$+$$ $$a(1+a+a^2...+a^n)$$ $$+$$ $$a^2(1+a+a^2...+a^n)$$ $$+.....$$ $$a^n(1+a+a^2...+a^n)$$

This gives the sum of,

$$\begin{align}1+\ \ a+&\ \ a^2+\ \ a^3+\dots+\ \ a^n \\\ \ a+&\ \ a^2+\ \ a^3+\dots+\ \ a^n+\ \ a^{n+1} \\&\ \ a^2+\ \ a^3+\dots+\ \ a^n+\ \ a^{n+1}+\ \ a^{n+2} \\&\quad\ \ \ \ \ \ \ \ \ a^3+\dots+\ \ a^n+\ \ a^{n+1}+\ \ a^{n+2}+\ \ a^{n+3}\\&\ \ \ \qquad\qquad\vdots\qquad\qquad\qquad\qquad\qquad\qquad\qquad\vdots \\\hline1+2a+&3a^2+4a^3+\dots+(n+1)a^n+na^{n+1}+\dots+a^{2n}\end{align}$$


Try to utilize a very well known formula: $$\left(\sum_i x_i\right)^2=\sum_i x_i^2+2\sum_{i<j}x_ix_j\,.$$ As you can see, I started from the end. But it does not matter for the proof.