Multinomial coefficient of a sequence in specific form I came across a question which asked me to find the coefficient of $x^{2n}$ in the following polynomial:
$$(\sum\limits_{i=0}^{n-1} x^i )^{2n+1}$$
My approach was to isolate every term, i.e. if we choose $x^2$ , n times and 1 n times again, we get a part of the coefficient of $x^{2n}$. Doing the same for $x^4$, n/2 times and iterating this process over and over would take a lot of time and the answer will be in the form of a sigma which maybe reduced as well.
However, the answer given was rather simple
Required form of answer

${2n+1}\choose{2}$-${{2n+1}\choose{1}}{{3n}\choose{n}}$+${4n}\choose{2n}$

My questions

*

*(if possible)How should I proceed with my method so that I reach the same results?

*Any other method to precisely find the number of solutions for the equation $$(\sum\limits_{i=1}^{2n+1} x_i )=2n$$ where all $0\leq x_i\leq n-1$

I would view it from the formal-power-series angle: $$\left(\sum_{k=0}^{n-1}x^k\right)^{2n+1}=\left(\frac{1-x^n}{1-x}\right)^{2n+1}=\underbrace{\left(\sum_{k=0}^{2n+1}(-1)^k\binom{2n+1}{k}x^{nk}\right)}_{=(1-x^n)^{2n+1}}\cdot\underbrace{\left(\sum_{k=0}^\infty\binom{2n+k}{k}x^k\right)}_{=(1-x)^{-2n-1}}$$ (both are instances of the binomial series), so that the coefficient of $x^{2n}$ is indeed $$\underbrace{(-1)^0\binom{2n+1}{0}\binom{2n+2n}{2n}}_{[x^{n\cdot 0+2n}]}+\underbrace{(-1)^1\binom{2n+1}{1}\binom{2n+n}{n}}_{[x^{n\cdot 1+n}]}+\underbrace{(-1)^2\binom{2n+1}{2}\binom{2n+0}{0}}_{[x^{n\cdot 2+0}]}.$$
Hence the final result is
$$\binom{4n}{2n}-\binom{2n+1}1\binom{3n}n+\binom{2n+1}2\;$$
