Linear Diophantine Equation/Examples/17x + 15y = 143

Example of Linear Diophantine Equation
The linear diophantine equation:
 * $17 x + 15 y = 143$

has the general solution in positive integers:
 * $\tuple {x, y} = \tuple {4, 5}$

Proof
Using the Euclidean Algorithm:

Thus we have that:
 * $\gcd \set {17, 15} = 1$

which is (trivially) a divisor of $143$.

So, from Solution of Linear Diophantine Equation, a solution exists.

Next we find a single solution to $17 x + 15 y = 143$.

Again with the Euclidean Algorithm:

and so:

is a solution.

From Solution of Linear Diophantine Equation, the general solution is:


 * $\forall t \in \Z: x = x_0 + \dfrac b d t, y = y_0 - \dfrac a d t$

where $d = \gcd \set {a, b}$.

In this case:

giving:

Both $x$ and $y$ must be non-negative integers.

Hence:

and:

Hence $t = 67$ and so:

The required solution is therefore:


 * $x = 4, y = 5$