How to find a general term of a trinomial? I want to find the coefficient of $x^0$ in the expansion of  $(x + 1 + 1/x)^4$.
Without an expansion, I keep getting "nested binomial" terms if I group two terms together:
$$\binom{4}{k}\binom{k}{m} (x)^{k-m}(1/x)^{m}$$
For which $k-2m = 0$. I cannot solve further without guessing and checking a value. What is a better way?

One approach is to multiply by $x^4$ and then find the coefficient of $x^4$ in the result.
Notation: $[x^n]f(x)$ denotes the coefficient of $x^n$ in $f(x)$. Then
$$\begin{align}
[x^0](x+1+1/x)^4 &= [x^4]x^4 (x+1+1/x)^4 \\
&=[x^4](x^2+x+1)^4 \\
&=[x^4] \left( \frac{1-x^3}{1-x} \right)^4 \\
&=[x^4](1-x^3)^4 \;(1-x)^{-4} \\
&=[x^4](1 -4x^3 +O(x^6)) \sum_{i=0}^{\infty} \binom{4+i-1}{i} x^i \tag{*} \\
&= \binom{4+4-1}{4} - 4 \binom{4+1-1}{1} \\
&= 19
\end{align}$$
where at $(*)$ we have used the Binomial Theorem for negative exponents.
