I am trying to find the number of solutions to the integral equation $|x|+|y|+|z|=10$ where $x,y,z\in\mathbb{Z}$. Here's what I've done so far.
My Attempt:
Let us fix a value of $|x|=k$, so $|y|+|z|=n-k$, (considering the general case of when $|x|+|y|+|z|=n$). So for each case $|y|+|z|=n-k$ has $(n-k+1)$ solutions in $|y|$ and $|z|$, and in total $4(n-k+1)$ because there's $4$ arrangements of $y$ and $z$ being $-$ or $+$, which is itself in correspondence with $2$ possibilities of $x$ when $|x|=k$, so total number of solutions should be $8\sum_{k=0}^{n}(n-k+1)=8\sum_{k=0}^{n}(k+1)=4(n+1)(n+2)$, so in this case number of solutions should be $528=48\cdot 11$.
The actual answer is given to be $402$. Any hints are appreciated. Thanks.
Hint:
Note that $+0 = -0 = 0$, i.e, $0$ doesn't have separate positive & negative values. When you're counting the number of solutions for the case $|y| + |z| = n - k$, you need to account for this (i.e., don't double count the $0$ values as being positive or negative) when you're determining the total number of solutions. I'll leave it to you to account for this to determine the appropriate updated total value.