<s>[INST] How many non-negative integer solutions does the equation $3x + y + z = 24$ have? If the equation is $x + y + z = 24$ then it is solvable with stars and bars theorem.  But what to do if it is $3x + y + z = 24$? 
 [/INST] Observe that $3x + y + z = 24$ implies that $y + z = 24 - 3x$.  For a fixed value of $x$, a particular solution of the equation $y + z = 24 - 3x$ corresponds to where we place an addition sign in a row of $24 - 3x$ ones.  For instance, if $x = 5$, $y + z = 9$ and
$$+ 1 1 1 1 1 1 1 1 1$$
corresponds to the solution $y = 0$ and $z = 9$, while 
$$1 1 1 1 1 1 + 1 1 1$$
corresponds to the solution $y = 6$ and $z = 3$.  The number of such solutions is the number of ways we can insert one addition sign in a row of $24 - 3x$ ones, which is $$\binom{24 - 3x + 1}{1} = \binom{25 - 3x}{1} = 25 - 3x$$ since we must select which of the $25 - 3x$ symbols ($24 - 3x$ ones and one addition sign) will be an addition sign.  Since $x$ is a non-negative integer satisfying $0 \leq 24 - 3x \leq 24$, $x$ can assume the nine values $0, 1, 2, 3, 4, 5, 6, 7, 8$.  Hence, the number of solutions of the equation $3x + y + z = 24$ in the non-negative integers is 
$$\sum_{k = 0}^{8} (25 - 3x) = \frac{9(25 + 1)}{2} = \frac{9 \cdot 26}{2} = 9 \cdot 13 = 117$$
since $$\sum_{k = 0}^{8} (25 - 3x)$$ is an arithmetic series consisting of nine terms with initial term $25$ and final term $1$.  
</s>