If $\beta(n)$ is the number of triples $(x, y, z)$ such that $x + y + z = n$ and $0 \le z \le y \le x$, find $\beta(n)$.
Attempt:
I think there are many cases to look at to find $\beta(n)$. We know that the number of solutions without restriction is $\binom{n+2}{2}$, but we need one ordering. The number of solutions $0 \leq z \leq y \leq x$ is the same as the number of solutions $0 \leq y \leq x \leq z$, etc. Thus, we just need to worry about the case that $x=y=z$ since this is the only case they'll intersect. If $n$ is divisible by $3$, then $\beta(n) = \dfrac{\binom{n+2}{2}-1}{3}+1$ and otherwise $\dfrac{\binom{n+2}{2}}{3}$.