(2 + 5x + 3y + 7z)^7
= [(2 + 5x) + (3y + 7z)]^7
= (2 + 5x)^7 + A(2 + 5x)^6(3y + 7z) + B(2 + 5x)^5(3y + 7z)^2 + C(2
+ 5x)^4(3y + 7z)^3 + D(2 + 5x)^3(3y + 7z)^4 + E(2 + 5x)^2(3y +
7z)^5 + F(2 + 5x)(3y + 7z)^6 + (3y + 7z)7
where A, B, C, D, E, F are constants (can find from calculator,
but I'm working mentally online immediately without using one)
Notice that:
All the terms will be in the form x^a * y^b * z^c
where a, b and c varies from 0 to 7, and a + b + c ≤ 7
I'm a bit too stupid to solve it using any igenious way at the
moment... so I shall use brute force way first... Hopefully someone
can point out a faster route
So,
When a+b+c = 7, we can use the numbers combi of
007, 016, 025, 034, 115, 124, 133, 223
Total number of terms = 3!/2! + 3! + 3! + 3! + 3!/2! + 3! + 3!/2! +
3!/2! = 33 terms
when a+b+c = 6, we can use the numbers combi of
006, 015, 024, 033, 114, 123, 222
Total number of terms = 3!/2! + 3! + 3! + 3!/2! + 3!/2! + 3! + 1 =
31 terms
when a+b+c = 5, we can use the numbers combi of
005, 014, 023, 113, 122
Total number of terms = 3!/2! + 3! + 3! + 3!/2! + 3!/2! = 21
terms
when a+b+c = 4, we can use the numbers combi of
004, 013, 022, 112
Total number of terms = 3!/2! + 3! + 3!/2! + 3!/2! = 15 terms
when a+b+c=3, we can use the numbers combi of
003, 012, 111
Total number of terms = 3!/2! + 3! + 1 = 10 terms
when a+b+c=2, we can use the numbers combi of
002, 011
Total number of terms = 3!/2! + 3!/2! = 6 terms
when a+b+c = 1, only 001. Number of terms = 3
when a+b+c = 0, only 1 term
Total number of terms = 33+31+21+15+10+6+3+1 = 120 terms