Find all the integral solutions to the equation $323x+391y+437z=10473$ Find all the integral solutions to the equation $323x+391y+437z=10473$.
I know how to find integer solutions in two variables using Diophantine Equations.
But I am stuck here because it involves 3 variables.
Can I get a hint?
 A: Since $\gcd(323,391,437)=1$ divide $10473$ we are supposed to find infinite solutions. 
Hint.  First find a solution $u_0$, $v_0$ of $$19u + 23 v = 437$$ 
where $19=323/17$ and $23=391/17$ with $17=\gcd(323,391)$.
Then let $t_0$, $z_0$ be a solution of 
$$17t+ 437z=10473$$ 
and  $x_0$, $y_0$ be a solution of 
$$19x + 23y = t_0.$$ 
Then $(x_0,y_0,z_0)$ is a particular solution of $323x+391y+437z=10473$, whereas the general solution is given by
$$\begin{cases}
x = x_0 - 23k - u_0j\\
y = y_0 + 19k - v_0j\\
z = z_0 + 17j \end{cases}$$
with $j,k\in\mathbb{Z}$.
Then compare your result given by Script.
P.S. Finally, I got the general solution:
$$\begin{cases}
x = 8 - 23k -23j\\
y = 9 + 19k\\
z = 10 + 17j \end{cases}\tag{*}$$
with $j,k\in\mathbb{Z}$. 
Verification that (*) are ALL the solutions of the given linear Diophantine equation. It is easy to check that the particular solution $(x_0,y_0,z_0)=(8,9,10)$ works. Moreover, the related homogeneous equation is
$$323(x-x_0)+391(y-y_0)+437(z-z_0)\\=17\cdot 19 (x-x_0)+17\cdot 23(y-y_0)+19\cdot 23 (z-z_0)=0$$
and it follows that  $z-z_0$ is a multiple of $17$, i.e. $z = z_0 + 17j$,  $y-y_0$ is a multiple of $19$, i.e. $y = y_0 + 19k$, and therefore
$$x=x_0-\frac{391(y-y_0)+437(z-z_0)}{323}=x_0-\frac{(17\cdot 19)\cdot 23 k+(19\cdot 23) \cdot 17j}{17\cdot 19}\\=x_0-23k-23j$$
and we are done.
Note that along the same lines, you may show that the method outlined above works in general.
A: Hint.  To mod $17$, $323\equiv0$, $391\equiv0$, $437\equiv12$ and $10473\equiv1$.  Hence $z$ must be such that $12z\equiv1\pmod{17}$.  Similar constraints can be found on $x$ using mod $23$ and $y$ using mod $19$.
