$f(x,y,z) = 5x+6y+8z$ such that $x,y,z>=0$ (numbers) , and f(x,y,z) max is 160 ,we need to find total no possible values this expression $f(x,y,z)$ takes less than than 161 with all x,y,z greater equal to zero and x+y+z max is 20 . ( I encountered this while trying to solve for total number of distinct terms in the expansion of $(1 +3x^5 +4 x^6 + 5x^8)$$^{20}$) any elegant method to get all values ? As i thought of this only when trying to solve for this binomial expansion. Or there is some different elegant method to get the total number of distinct terms ? ...
2026-04-06 20:34:40.1775507680
Length of this expression can take in positive integers including 0
91 Views Asked by user900638 https://math.techqa.club/user/user900638/detail At
1
We want to find the number $K$ of non-zero terms of the polynomial \begin{align*} P(x)=\left(1 +3x^5 +4 x^6 + 5x^8\right)^{20}\tag{1} \end{align*} Since $\mathrm{deg}\left(P(x)\right)=160$ we know $K\leq 161$.
We want to calculate with sets and define some commonly used operations. Let $M,N$ be sets containing non-negative integers, and $t\in\mathbb{N}_0$. We define \begin{align*} M+N=\left\{x+y\Big|x\in M,y\in N\right\},\qquad tM= \left\{t x\Big|x\in M\right\} \end{align*} We also use the short-hand notation $[n]:=\{0,1,2,\ldots,n\}$.
Expressions $8c$:
We want to count the number of tripels of the form $5a+6b+8c$ and we start with the set $M_8$ of all valid multiples of $8$. We obtain
\begin{align*} M_8=\left(8\mathbb{N}_0\cap [160]\right) =\{0,8,16,24,\ldots,120,128,136,144,152,160\} \end{align*} Each of the elements $M_8$ is a valid power of an $x$-term and we have \begin{align*} \color{blue}{\left|M_8\right|=21}\tag{4} \end{align*}
Expressions $5a+8c$:
Next we consider expressions of the form $5a+8c$. Since the $\mathrm{lcm}(5,8)=40=8\cdot 5$ we have $7$ cosets of the form \begin{align*} \left(M_8+j\cdot\{5\}\right)\cap[8(20-j)+5j]\qquad\qquad 1\leq j\leq 7 \end{align*}
We obtain for $1\leq j\leq 7$: \begin{align*} \left|\left(M_8+\{5\}\right)\cap[157]\right|&=\left|\{5,13,21,\ldots,157\}\right|\,\,\,=20\\ \left|\left(M_8+2\cdot\{5\}\right)\cap[154]\right|&=\left|\{10,18,26,\ldots,154\}\right|=19\\ \left|\left(M_8+3\cdot\{5\}\right)\cap[151]\right|&=\left|\{15,23,31,\ldots,151\}\right|=18\\ \left|\left(M_8+4\cdot\{5\}\right)\cap[148]\right|&=\left|\{20,28,36,\ldots,148\}\right|=17\\ \left|\left(M_8+5\cdot\{5\}\right)\cap[145]\right|&=\left|\{25,33,41,\ldots,145\}\right|=16\\ \left|\left(M_8+6\cdot\{5\}\right)\cap[142]\right|&=\left|\{30,38,46,\ldots,142\}\right|=15\\ \left|\left(M_8+7\cdot\{5\}\right)\cap[139]\right|&=\left|\{35,43,51,\ldots,139\}\right|=14\\ \end{align*}
We sum up and get with (4) \begin{align*} \color{blue}{21+(20+19+18+17+16+15+14)=140}\tag{5} \end{align*} This way we found already pretty much of the possible non-negative integers $\leq 160$. We try to exhaust the missing valid numbers by checking:
Expressions $6b+8c$:
Since $\mathrm{lcm}(6,8)=24=4\cdot 6$ we have $3$ cosets of the form \begin{align*} \left(M_8+j\cdot\{6\}\right)\cap[8(20-j)+6j]\qquad\qquad 1\leq j\leq 3 \end{align*} In the previous step we had the convenient situation that all the sets were pairwise disjoint. This is no longer the case and we have to filter out the wanted numbers by a somewhat closer inspection.
We obtain for $1\leq j\leq 3$: \begin{align*} \left|\left(M_8+\{6\}\right)\cap[158]\right|&=\left|\{6,14,22,\color{blue}{30\ldots,142},150,158\}\right|\to 5\\ \left|\left(M_8+2\cdot\{6\}\right)\cap[156]\right|&=\left|\{12,\color{blue}{20,\ldots,148},156\}\right|\qquad\qquad\to 2\\ \left|\left(M_8+3\cdot\{6\}\right)\cap[154]\right|&=\left|\{\color{blue}{18,\ldots,154}\}\right|\qquad\qquad\qquad\quad\ \to 0\\ \end{align*}
The blue marked entries were already considered in previous steps. We sum up and get with (5) \begin{align*} \color{blue}{140+(5+2+0)=147}\tag{6} \end{align*}
Expressions $5a+6b+8c$:
We obtain for $(a,b)=(1,1)$: \begin{align*} \left|\left(M_8+\{5\}+\{6\}\right)\cap[155]\right|&=\left|\{11,19,27,\color{blue}{35\ldots,139},147,155\}\right|\to 5\\ \end{align*} We obtain for $(a,b)=(1,2)$: \begin{align*} \left|\left(M_8+\{5\}+2\cdot\{6\}\right)\cap[153]\right|&=\left|\{17,\color{blue}{25\ldots,145},153\}\right|\to 2\\ \end{align*}
The blue marked entries were already considered in previous steps. We sum up and get with (6) \begin{align*} \color{blue}{147+(5+2)=154} \end{align*}