# Number of terms$(2x+3y-4z)^n$

What is the number of terms in the expansion of $(2x+3y-4z)^n$?

For terms of type $(x+y)^n$ we have $n+1$ terms but for three type of term I am not able to solve it. I know the answer but not able to derive it

• Could you figure it out if you rewrote it as $((2x+3y)-4z)^n$ and then used your formula for $(x+y)^n$ (perhaps many times)? Sep 15, 2017 at 9:24
• I have thought of this by substituting 3y-4z=z, we know the formula of (x+y)^n , it i want some gemeral ways Sep 15, 2017 at 9:26
• You can derive the formula if you do this, what do you mean by "general ways"? Sep 15, 2017 at 9:29

The number of terms in $(x+y)^n$, when expanded is $n+1$. Now, if we look at $(2x+3y-4z)^n$ and let $w=2x+3y$, then you have $(w-4z)^n$, which has $n+1$ terms.
Each of these terms is of the form $C(2x+3y)^a(-4z)^{n-a}$, where $C$ is an appropriate constant. Since each of these terms has a different power on $z$, when you expand the first part, there will be no cancellation.
Since $a$ can vary between $0$ and $n$, and we know how many terms $(2x+3y)^a$ expands into, we get that the number of terms is $$1+2+\dots+(n+1)=\sum_{a=0}^n a+1.$$ This has a standard formula and is $$\frac{(n+1)(n+2)}{2}.$$
• @Kaushik Two monomials can be combined exactly when $x$, $y$, and $z$ have the same powers (like $2x^2y+3x^2y=5x^2y$). In this case, however, the powers on the $z$'s are all different, so the terms don't combine. Sep 21, 2019 at 13:51
A general term in the expansion has the form $$2^{k_1}x^{k_1}\,3^{k_2}y^{k_2}\,(-4)^{k_3}z^{k_3},\quad \text{satisfying the condition}\quad k_1+k_2+k_3=n,$$ so the number of terms is just the number of solutions of the equation in natural numbers: $k_1+k_2+k_3=n$. This is a special case of the general equation: $$k_1+k_2+\dots+k_r=n,\qquad k_1,k_2,\dots,k_r\in\mathbf N.$$ It can be shown by induction the number of solutions of the general equation is equal to $$S(n,r)=\binom{n+r-1}{r-1}.$$