Finding number of possible words of length (multinomial theorem) Consider words
$$
x=(x_0,x_1,\ldots,x_{n-1})
$$
of length $n$ and with 
$$
x_i\in\{0,-1,1\}\text{ for } i=0,1,\ldots,n-1.
$$
Let 
$$
j(x)=\sum_{i=0}^{n-1}x_i
$$
be the sum of the components of $x$. Then
$$
-n\leq j(x)\leq n.
$$

I am trying to find the number of words of the type above with length $n$ and with $j(x)=m$.

Up to my opinion, I think there are
$$
c(n,m):=\sum_{m_0+m_1+m_{-1}=n\\m_1-m_{-1}=m}\frac{n!}{m_0!m_1!m_{-1}!}
$$
such words, where $m_0$ is the number of the components with 0, $m_1$ is the number of components with 1 and $m_{-1}$ is the number of components with $-1$.
Moreover, I think -  by the multinomial theorem - $c(n,m)$ is the coefficient of $x^m$ in
$$
(1+x+x^{-1})^n.
$$
Am I right?
Is there any problem with the summand $x^{-1}$ in order to apply the multinomial theorem? I think the polynomial $(1+x+x^{-1})^n$ is defined for $x\in\mathbb{R}\setminus\{0\}$ and so the multinomial theorem should hold for all $x\in\mathbb{R}\setminus\{0\}$.
 A: Cluetip: Try to write $n-|{m}|$ as $2k+l$
$k$ is the set of couples (-1,1), $l$ is the number of 0's, both are void.
For example if $n=10$ and $m=5$, $n-m=5$ written as: $2*1+3,2*2+1,2*0+5$.
Wich says that number of arrangements are arrangements of undistinguishable sets of $m+k$ 1's and $k$ -1's and $l$ 0's.This equals 
-------------------------------- Your approach -------------------------------------------
By using your approach it sums to $\binom{n}{m+k,k,l}$ the sum is all valid multinomial permutations:
$$\sum_{i=0}^{\lfloor\frac{n-|m|}{2}\rfloor}\frac{n!}{(|m|+i)!i!(n-|m|-2i)!}$$
---------------------------- My annoying approach --------------------------------------
$f(m+k,k+l)= \begin{cases}  \sum_{i=0}^{k+l}\binom{m+k}{i}f'(k,l,i+1) \ if\ \ m+k>l+k  &\\ &\\ \sum_{i=0}^{m+k}\binom{m+k}{i}f'(k,l,i+1)\ \  if \ \ l+k>=m+k &\\ \end{cases} $
$f'(k,l,i)= \begin{cases}  \binom{k+l}{i}\sum_{j=0}^{l}\binom{k}{j}f''(i+1,l) \ if\ \ k>l &\\ &\\ \binom{k+l}{i}\sum_{j=0}^{k}\binom{k}{j}f''(i+1,l)\ \  if \ \ l>=k &\\ \end{cases} $
$f''(i,l)=\binom{l}{i-1}$
This is quite sophisticated and tricky, f is n° of distributions of m+k 1's into k+l segments filled by f' configurations of (0,-1).
f' is k+l -1's intermediated by f'' 0's.
f'' is a set of zeros applied for stars & bars rule upon i subsets of -1.
