Please explain me how can I calculate a number of possible solutions for such inequality and obtain those values:
$$3x + 7y + z \leq 198$$
where $x,y,z$ are integers (non-negative).
Please explain me how can I calculate a number of possible solutions for such inequality and obtain those values:
$$3x + 7y + z \leq 198$$
where $x,y,z$ are integers (non-negative).
I would recommend approaching via generating functions.
First, to account for the fact that it is less than or equal, consider the related problem of counting the non-negative integer solutions of $3x+7y+z+\color{red}{w}\color{blue}{=}198$. The number of solutions of the original question will be the same as the number of solutions of this related question.
We have the following generating function:
$$f(t)=(1+t^3+t^6+t^9+\dots)(1+t^7+t^{14}+t^{21}+\dots)(1+t+t^2+\dots)(1+t+t^2+\dots)$$
$$=\frac{1}{(1-t^3)(1-t^7)(1-t)(1-t)}$$
Using your favorite mathematics software and expanding the generating function, you have
$f(t)=1+2t+3t^2+5t^3+7t^4+\dots+66368t^{197}+\color{red}{67354t^{198}}+68350t^{199}+\dots$
The coefficient of $t^{198}$ is the number of non-negative integer solutions to the equation $3x+7y+z+w=198$, and hence of the original question.