I have just come across a question (in a past exam paper for a module that I will be taking soon) which asks what the coefficient of $x^n$ is in the expansion of $$ (1+x+x^2+x^3+x^4+\dots)^4 $$
Can anyone give me an idea as to how this might be done? Using Wolfram Alpha to expand the brackets and then by inspecting the coefficient of each power manually, I was able to deduce that the coefficient of $n^\text{th}$ term is given by $C(n+2, 3)$. How might I have been able to work this out for myself?
Hint: Assuming $|x| < 1$ so that the series converges absolutely, all rearrengements are valid. Then write $u(x) = x^{n + 1} + x^{n + 2} + \ldots$ You are interested in $(1 + x + \ldots + x^n + u(x))^4,$ which you can develop using Newtown's multinomial expansion and observing that everything with a factor of $u(x)$ will be discarded.