Suppose that we have the following: $aX+bY+cZ=d$
where $X, Y, Z$ are positive integers and
$X+Y+Z \le g$
Does the condition to have $gcd(a,b,c)|d$ (to show a solution exists) still valid in this problem? How to know if we only have a unique solution?
Let $e=\gcd(a,b,c)$ .
This means that $a=e\cdot a', b=e \cdot b',c=e \cdot c'$.
But $aX+bY+cZ=d$, so this means that $e\cdot(a'X+b'Y+c'Z)=d$. So $e$ must divide $d$.