TITLE: Number of nonnegative integral solutions of $3x+y+z \leq 25$
QUESTION [6 upvotes]: Find the number of nonnegative integral solutions of $$3x+y+z \leq 25$$

I can get the answer to $3x+y+z=25$ but I can't get the answer with inequality. Please help.

REPLY [2 votes]: $\newcommand{\bbx}[1]{\,\bbox[8px,border:1px groove navy]{\displaystyle{#1}}\,}
 \newcommand{\braces}[1]{\left\lbrace\,{#1}\,\right\rbrace}
 \newcommand{\bracks}[1]{\left\lbrack\,{#1}\,\right\rbrack}
 \newcommand{\dd}{\mathrm{d}}
 \newcommand{\ds}[1]{\displaystyle{#1}}
 \newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,}
 \newcommand{\ic}{\mathrm{i}}
 \newcommand{\mc}[1]{\mathcal{#1}}
 \newcommand{\mrm}[1]{\mathrm{#1}}
 \newcommand{\pars}[1]{\left(\,{#1}\,\right)}
 \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
 \newcommand{\root}[2][]{\,\sqrt[#1]{\,{#2}\,}\,}
 \newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}}
 \newcommand{\verts}[1]{\left\vert\,{#1}\,\right\vert}$

The number of solutions $\ds{\,\mc{S}_{s}}$ with $\ds{3x + y + z = s}$  $\ds{\pars{~\mbox{with}\ x,y,z\ \in\ \mathbb{N}_{\geq 0}\ \mbox{and}\
s \geq 0~}}$ is given by: 

\begin{align}
\mc{S}_{s} & \equiv \bracks{t^{s}}\sum_{x = 0}^{\infty}t^{3x}
\sum_{y = 0}^{\infty}t^{y}\sum_{z = 0}^{\infty}t^{z} =
\bracks{t^{s}}{1 \over \pars{1 - t^{3}}\pars{1 - t}^{2}}
\\[5mm] & =
\bracks{t^{s}}\sum_{i = 0}^{\infty}t^{3i}
\sum_{j = 0}^{\infty}{-2 \choose j}\pars{-t}^{j} =
\bracks{t^{s}}\sum_{i = 0}^{\infty}\sum_{j = 0}^{\infty}
\pars{j + 1}\sum_{k = 0}^{\infty}\delta_{k,3i + j}\,t^{k}
\\[5mm] & =
\bracks{t^{s}}\sum_{k = 0}^{\infty}\bracks{\sum_{i = 0}^{\infty}\sum_{j = 0}^{\infty}\pars{j + 1}\delta_{k,3i + j}}t^{k} =
\sum_{i = 0}^{\infty}\sum_{j = 0}^{\infty}\pars{j + 1}\delta_{s,3i + j} =
\sum_{i = 0}^{\left\lfloor s/3 \right\rfloor}\pars{s - 3i + 1}
\end{align}

The number of solutions with $\ds{3x + y + z \leq 25}$
  $\ds{\pars{~\mbox{with}\ x,y,z\ \in\ \mathbb{N}_{\geq 0}~}}$ is given by:

\begin{align}
\sum_{s = 0}^{25}\mc{S}_{s} & =
\sum_{s = 0}^{25}\sum_{i = 0}^{\left\lfloor s/3\right\rfloor}\pars{s - 3i + 1} =
\bbx{\ds{1215}}
\end{align}