How many integral solutions does $2x + 3y + 5z = 900$ have when $ x, y, z \ge 0$? Solution: Let $2x + 3y = u.$ Then we must solve $\begin{align} u + 5z = 900 \tag 1 \\ 2x + 3y = u \tag 2 \end{align}$
For $(1),$ a particular solution is $(u_0, z_0) = (0, 180).$ Hence, all the integral solutions of $(1)$ are $\begin{cases} u = 5t \\ z = 180 - t \end{cases} (t \in \mathbb Z)$
Substituting $u = 5t$ into $(2)$ gives $2x + 3y = 5t$ whose particular solution is $(x_0, y_0) = (t, t).$ Hence all the integral solutions of $(2)$ are $\begin{cases} x = t - 3s \\ y = t + 2s \end{cases} (t \in \mathbb Z)$
Thus all the integral solutions of $2x + 3y + 5z = 900$ are given by $$\begin{cases} x = t - 3s \\ y = t + 2s \\ z = 180 - t \end{cases} (s,t \in \mathbb Z)$$
Now suppose $x, y, z \ge 0.$ 
Note, $180 - t \ge 0 \implies t \le 180$ and so $t + 2s \ge 0 \implies s \ge -90$ and $t - 3s \ge 0 \implies s \le 60.$ Thus we have $-90 \le s \le 60.$ 
Consider $0 \le s \le 60.$ Now $t \le 180, \ t \ge 3s \implies 3s \le t \le 180$. Thus in this range of $s$, there are $180 - 3s + 1 = 181 - 3s$ of $t$'s.
Consider $-90 \le s < 0.$ Now $t \le 180, \ t \ge -2s \implies -2s \le t \le 180$. Thus in this range of $s$, there are $180 + 2s + 1 = 181 + 2s$ of $t$'s.
Range $0 \le s \le 60$ has the following points:
$(0, 181 - 3(0)), \ (1, 181 - 3(1)), (2, 181 - 3(2), \ldots (60, 181 - 3(60))$ of which there are $61.$
The range $-90 \le s < 0$ must have $91$ points. In sum, we have $61 + 91 = 152$ points for $x, y, z \ge 0.$
My question:
According to the book the answer is $\displaystyle{\sum_{s = 0}^{60}(181 - 3s) + \sum_{s = -90}^{-1}(181 + 2s) = 13651.}$ I don't understand why they took the sum of all $t$'s in the range of $s$. That means some of my denotations and labels above must be incorrect. Where's the mistake? Thanks.
edit: 
I think I see my mistake. The number $181 - 3s$ is the number of $t$'s, not necessarily the form of $t$. Given that, the number of ordered pairs (in the given range) must be $(181 - 3s)*61$ by the product rule.
 A: Not an answer, but potentially helpful:
The following MiniZinc model confirms, that there are actually $13651$ solutions.
set of int: Domain = 0..900;
var Domain: x;
var Domain: y;
var Domain: z;

constraint (2*x + 3*y + 5*z) == 900;

A: Since the generating function
$$ f(z)=\frac{1}{(1-z^2)(1-z^3)(1-z^5)} $$
has a triple pole at $z=1$ and simple poles at $9$ points of $S^1$, we may decompose it as
$$ f(z) = \frac{1}{30(1-z)^3}+\frac{7}{60(1-z)^2}+\sum_{k=1}^{8}\frac{R_k}{z-R_k} $$
and deduce that the coefficient of $z^n$ in $f(z)$, up to a bounded error term (bounded by $\sum_{k=1}^{8}|R_k|$) is given by
$$ [z^n]\left[\frac{1}{30(1-z)^3}+\frac{7}{60(1-z)^2}\right]=\frac{(n+1)(n+9)}{60} $$
(this follows from stars and bars). By evaluating the RHS at $n=900$ we get a bit more than $13650$, and the number of representations of $900$ as $2a+3b+5c$ is actually $13651$. In order to have a simultaneous control of the magnitude and the error term we may prove first that
$$  [x^n]\frac{1}{(1-x^2)(1-x^3)} = \frac{2n+5}{12}+3(-1)^n+\left\{\begin{array}{rcl}1&\text{if}&n\equiv 0\pmod{3}\\-1&\text{if}&n\equiv 1\pmod{3}\\0&\text{if}&n\equiv 2\pmod{3}\\\end{array}\right.$$
which equals $\left\lfloor\frac{n+4}{6}\right\rfloor$, increased by one if $n\equiv 0\pmod{6}$. It follows that the exact number of representations is given by
$$ 31+\sum_{k=0}^{180}\left\lfloor \frac{5k+4}{6}\right\rfloor = 13651. $$
The sum in the last line equals the number of lattice points in a trapezium. By Pick's theorem this is given by the area of the trapezoid and the number of lattice points on the line $y=\frac{5x+4}{6}$, for $x\in[0,180]$. This counting problem is analogous to the determination of 
$$|[4,904]\cap6\mathbb{Z}|=180.$$
A: You can solve this problem by creating equals Ax = b. Where A - transition matrix by x and b.
Let's consider this example.
Introduce F(m, i) where F(m, 1) - count of solutions 2x = m, F(m, 2) - count of solutions 2x + 3y = m, F(m, 3) - count of solution 2x + 3y + 5z = m ...
The following equations are valid:
F(m, 1) = F(m - 2, 1)
F(m, 2) = F(m, 1) + F(m - 3, 2) = F(m - 2, 1) + F(m - 3, 2)
F(m, 3) = F(m, 2) + F(m - 5, 3) = F(m - 2, 1) + F(m - 3, 2) + F(m - 5, 3)
Vector b we can construct as [F(m, 1), F(m - 1, 1), F(m, 2), F(m - 1, 2), F(m - 2, 2), F(m, 3), F(m - 1, 3), F(m - 2, 3), F(m - 3, 3), F(m - 4, 3)].
Vector x we can construct as [F(m - 1, 1), F(m - 2, 1), F(m - 1, 2), F(m - 2, 2), F(m - 3, 2), F(m - 1, 3), F(m - 2, 3), F(m - 3, 3), F(m - 4, 3), F(m - 5, 3)].
Matrix A is easily constructed by x and b.
Start vector x is [F(0, 1), F(-1, 1), F(0, 2), F(-1, 2), F(-2, 2), F(0, 3), F(-1, 3), F(-2, 3), F(-3, 3), F(-4, 3)] and have value [1, 0, 1, 0, 0, 1, 0, 0, 0, 0]
And it's finish.
We interested in F(900, 3). We need calculate A^900 * x and take appropriate b[5].
We can raise the matrix to a power by O(2 * lb(900) * 10^3)
A: Above equation shown below:
$2x+3y+5z=900 ------(1)$
Equation $(1)$ is equivalent to :
$ax+by+cz=n  -----(2)$
Where, $(a,b,c,n)=(2,3,5,900)$
If, $(p,q,r)$ is a known solution to equation (2), 
then another solution is given as:
$x=p-bt+ct$
$y=q+at-ct$
$z=r-at+bt$
Where, $'t'$ is a parameter.
Taking $'w'$ as the number of solutions to equation $(2)$ 
then, "J. Franel" has given a formula for $'w'$.
$w={n}[(a(p+1)+b(q+1)+c(r+1))/(2abc)]$
For, $(p,q,r)=(6,16,168)$ & $(a,b,c,n)=(2,3,5,900)$ we have :
$w=13650$
