The number of terms in the Multinomial Expansion $(x+\frac{1}{x}+x^2+\frac{1}{x^2})^n$ I am aware that there is a formula to calculate the number of terms in a multinomial expression $(x_1+x_2+x_3+...x_r)^n$, i.e. $^{n+r-1}C_{r-1}$. However, this is in the case when the terms $x_1, x_2, x_3 ... x_r$ are different variables. In my case, the variables are the same; i.e. x, raised to different powers. Can someone please point me in the right direction?
 A: 
We obtain
  \begin{align*}
\color{blue}{\left(x+\frac{1}{x}+x^2+\frac{1}{x^2}\right)}&=\frac{1}{x^{2n}}(1+x+x^2+x^3)^n\\
&=\frac{1}{x^{2n}}\left(1+x+x^3\left(1+x\right)\right)^n\\
&=\frac{1}{x^{2n}}(1+x)^n(1+x^3)^n\\
&\color{blue}{=\frac{1}{x^{2n}}\sum_{j=0}^n\binom{n}{j}x^j\underbrace{\sum_{k=0}^n\binom{n}{k}x^{3k}}_{n+1\text{ terms}}}\tag{1}
\end{align*}

Let's have a look at the three factors in (1). 


*

*The rightmost sum contains $n+1$ pairwise different terms with exponents $3k,0\leq k\leq n$.

*The leftmost factor $\frac{1}{x^{2n}}$ does not change the number of different terms as it is just a shift of each exponent of $x$ by $-2n$.

*Now we assume $n\geq 2$  and analyse the left sum. A multiplication with the first three terms $\binom{n}{0},\binom{n}{1}x,\binom{n}{2}x^2$ results in $3(n+1)$ terms 
\begin{align*}
\sum_{j=0}^n a_kx^{3k\color{blue}{+0}},\sum_{j=0}^n b_kx^{3k\color{blue}{+1}},\sum_{j=0}^n c_kx^{3k\color{blue}{+2}}
\end{align*}
which gives a sum of increasing powers of $x^k, 0\leq k\leq 3(n+1)$. Additionally we observe that whenever $n(>2)$ is increased by $1$, the overall number of terms is increased  by  $1$.  

We  conclude: The number of different terms in the expansion of $\left(x+\frac{1}{x}+x^2+\frac{1}{x^2}\right)^n$ is
  \begin{align*}
\color{blue}{1}&\qquad \color{blue}{n=0}\\
\color{blue}{4}&\qquad \color{blue}{n=1}\\
3(n+1)+(n-2)=\color{blue}{4n+1}&\qquad \color{blue}{n\geq 2}
\end{align*}

A: HINT-You have $$(x+\frac{1}{x}+x^2+\frac{1}{x^2})^n=\left(\frac{x^4+x^3+x+1}{x^2}\right)^n=\frac{(x+1)^n(x^3+1)^n}{x^{2n}}$$ Therefore you don't need in this case the multinomial
$$\displaystyle (x_1+x_2+x_3+x_4)^n=\sum_{0 \le k_i\le 4}^{}\binom{n}{k_1,k_2,k_3,k_4}\prod_{i=1}^{4}x_i^{k_i}$$ which has $35$ terms. Anyway you have to calculate the corresponding simplifications in exponents.
