I stumbled upon this problem when preparing a lecture about random walks. The problem is as follows:
Suppose we have a sequence of $n$ numbers, and each of them can be $1$, $0$ or $-1$. What is the number of possible combinations (without repetitions) that add up to a given number (evidently the sum has to be between $-n$ and $n$)?
The fact that a $-1$ plus a $1$ has the same net effect as a $0$ is making the problem quite cumbersome for me. Is it possible to get an analytical solution?