If x, y, and z are positive integers such that \(6xyz+30xy+21xz+2yz+105x+10y+7z=812\), find x+y+z.
a=0;b=0;c=0;p=0; cycle:d=a*100+b*10+c;if(6*a*b*c+30*a*b+21*a*c+2*b*c+105*a+10*b+7*c==812, goto loop, goto next); loop:printd," ",;p=p+1; next:c++;if(c<10, goto cycle, 0);c=0;b++;if(b<10, goto cycle, 0);b=0;c=0;a++;if(a<10, goto cycle,0);print"Total = ",p
x y z
2 2 6
P.S. I haven't got a clue on how to solve it algebraically !!
6xyz + 30xy + 21xz + 2yz + 105x + 10y + 7z = 812
3x ( 2yz + 10y + 7z) + (2yz + 10y + 7z) + 105x = 812
3x (2yz + 10y + 7z) + (2yz + 10y + 7z) + 3x(35) = 812
3x [ 2yz +10y + 7z + 35 ] + [2yz + 10y + 7z] = 812 add 35 to both sides
3x ( 2y +7)(z + 5) + 2yz + 10y + 7z + 35 = 812 + 35
3x (2y + 7) (z + 5) + 1* (2y + 7)(z +5) = 847 factor the left side
(3x + 1) (2y + 7) (z + 5) = 847
Note that
7 * 11^2 = 847 ....so....
7 * 11 * 11 = 847
So we can let x =2, y = 2 and z = 6
So
x + y + z = 2 + 2 + 6 = 10