The problem originally was:
Let $r$ be a positive integer, and $p_n$ the number of solutions to the equation: $|x_1|+|x_2|+...+|x_r|=n$ when $x_k$ may be positive, negative or zero.
Find the generating function of $p_n$. The function should be written explicitly (for example, not as a multiplication of two infinite series).
What I did is:
$$(1+2x+2x^2+...)^r=(\frac{1}{1-x}+\frac{x}{1-x})^r=(\frac{1+x}{1-x})^r=\sum_{i=0}^{\infty} \sum_{j=0}^{\infty}{r\choose i}{j+r-1\choose r-1}x^{i+j} $$
Now, for $i+j=n$, we get that the coefficient of $x^n$ is: $$\sum_{i=0}^{\infty} {r\choose i}{n-i+r-1\choose r-1} = \sum_{i=0}^{r} {r\choose i}{n-i+r-1\choose r-1} $$ Something that I am not able to simplify, and I am afraid that my answer (if correct) does not meet the criteria posed in the question.
I have tried to mess around with the expression but couldn't really simplify it.
Any insight will be appreciated.