Express an integer $m$ as sum of 1, 0 and -1 for fixed number of summands $j$ Let $j \in \mathbb{N}_0$. I'm looking for the number of all possible combinations, such that for a given $|m| \leq j, m \in \mathbb{Z}$
$m = \sum \limits_{k=1}^{j} a_k\quad$ where $a_k \in {-1, 0, 1}$
Examples:
$j=3;m=3 \Rightarrow a \in A=\left\{\begin{pmatrix}1\\1\\1\end{pmatrix}\right\}\quad \#A = 1$
$j=3;m=2 \Rightarrow a \in A=\left\{\begin{pmatrix}1\\1\\0\end{pmatrix},\begin{pmatrix}1\\0\\1\end{pmatrix},\begin{pmatrix}0\\1\\1\end{pmatrix}\right\}\quad\#A=3$
$j=3;m=1 \Rightarrow a \in A=\left\{\begin{pmatrix}1\\0\\0\end{pmatrix},\begin{pmatrix}0\\1\\0\end{pmatrix},\begin{pmatrix}0\\0\\1\end{pmatrix},\begin{pmatrix}1\\1\\-1\end{pmatrix},\begin{pmatrix}1\\-1\\1\end{pmatrix},\begin{pmatrix}-1\\1\\1\end{pmatrix}\right\}\quad \#A = 6$
$j=3;m=0 \Rightarrow a \in A=\left\{\begin{pmatrix}0\\0\\0\end{pmatrix},\begin{pmatrix}1\\-1\\0\end{pmatrix},\begin{pmatrix}1\\0\\-1\end{pmatrix},\begin{pmatrix}0\\1\\-1\end{pmatrix},\begin{pmatrix}0\\-1\\1\end{pmatrix},\begin{pmatrix}-1\\0\\1\end{pmatrix},\begin{pmatrix}-1\\1\\0\end{pmatrix}\right\}\quad \#A = 7$
Is there some formula that relates $\#A$ to $m$ and $j$?

I'll use $n$ instead of $j$. We can assume $m$ is nonnegative, since replacing $m$ with $-m$ gives the same answer (by negating all the solutions).
We can count the solutions in groups according to how many $1$s there are. In order for the sum $m$ to be possible, we need at least $m$ $1s$ and at most $\left\lfloor (m+n)/2\right\rfloor$ of them. Once we've chosen to use $k$ of them, we can then choose where they go ($k$ out of $n$ positions) and then where the $-1$s go ($k-m$ out of $n-k$ positions). The total number of solutions is therefore
$$\sum_{k=m}^{\left\lfloor (m+n)/2\right\rfloor}\binom nk\binom{n-k}{k-m}.$$
We could also just let the sum run from $k=0$ to $n$ and let $\binom ab=0$ whenever $b\notin[0,a]$.
