The problem is about a random walker with probabilities to go to the right $p_1$ and go to the left $p_2$ with an additional probability $p_3$ to stay still and a total number of steps $N=N_1+N_2+N_3$. I'm aware that the multinomial distribution must be used:
$W_N(N_1,N_2)=\frac{N!}{N_1!N_2!(N-N_1-N_2)!}p_1^{N_1}p_2^{N_2}(1-p_1-p_2)^{N-N_1-N_2}$
What I'm stuck at is, by defining a position $x=nl$ where the walker could be after $N$ steps ($l$ being the step size), what would be the probability $P(n)$. What I've tried to is to define $n=N_1-N_2$, and obtain a distribution:
$P(n)=\sum_{N_1=0}^{N_1=N-N_2}W_N(N_1,N_2)=\sum_{N_1=0}^{N_1=\frac{N+n}{2}}\frac{N!}{N_1!(N_1-n)!(N+n-2N_1)!}p_1^{N_1}p_2^{N_1-n}(1-p_1-p_2)^{N+n-2N_1}$
$P(n)=\sum_{N_1=0}^{N_1=\frac{N+n}{2}}\binom{N}{N_1-n}\binom{N-N_1+n}{N_1}p_1^{N_1}p_2^{N_1-n}(1-p_1-p_2)^{N+n-2N_1}$
I don't know any general method for solving this type of summation. I'm aware that the marginal distribution could be calculated for $P(N_1)$ as in this question: Sum in the marginal distribution of the trinomial but due to the parameters of the binomials (in my case) which are inside the summation, I don't know how to proceed. I've tried as well using Wolfram Alpha (command: sum(multinomial(a,a-n,N+n-2a)(p)^a*(q)^(a-n)(1-p-q)^(N+n-2a),a,0,N/2+n/2)) to look at the solution, but the answer brought together a hypergeometric function.
Is there a general solution to this, or my logic is flawed?
Thanks in advance.