<s>[INST] Number of Non negative integer solutions of $x+2y+5z=100$ Find Number of Non negative integer solutions of $x+2y+5z=100$
My attempt: 
we have $x+2y=100-5z$ 
Considering the polynomial $$f(u)=(1-u)^{-1}\times (1-u^2)^{-1}$$
$\implies$
$$f(u)=\frac{1}{(1-u)(1+u)}\times \frac{1}{1-u}=\frac{1}{2} \left(\frac{1}{1-u}+\frac{1}{1+u}\right)\frac{1}{1-u}=\frac{1}{2}\left((1-u)^{-2}+(1-u^2)^{-1}\right)$$ 
we need to collect coefficient of $100-5z$ in the above given by
$$C(z)=\frac{1}{2} \left((101-5z)+odd(z)\right)$$
Total number of solutions is
$$S(z)=\frac{1}{2} \sum_{z=0}^{20} 101-5z+\frac{1}{2} \sum_{z \in odd}1$$
$$S(z)=540.5$$
what went wrong in my analysis?
 [/INST] Note that the number of non-negative integer solutions of the following equation
$$ x+y=n $$
is $n+1$. Here $n$ is a non-negative integer. Clearly $5|(x+2y)$. Let 
$$x+2y=5k\tag{1}$$ 
where $0\le k\le 20$. For (1), if $k$ is odd, then so is $x$, and if $k$ is even, then so is $x$.
Case 1: $k$ is odd. Let $k=2n-1$ and $x=2m-1$. Then $1\le n\le 10$ and (1) becomes
$$ m+y=5n-2 $$
whose number of non-negative integer solutions is $5n-1$.
Case 2: $k$ is even. Let $k=2n$ and $x=2m$. Then $0\le n\le 10$ and (1) becomes
$$ m+y=5n $$
whose number of non-negative integer solutions is $5n+1$.
Thus the number of non-negative integer solutions is
$$ \sum_{n=1}^{10}(5n-1)+\sum_{n=0}^{10}(5n+1)=551 $$
</s>