Linear Diophantine Equation/Examples/35x - 256y = 48

Example of Linear Diophantine Equation
The linear diophantine equation:
 * $35 x - 256 y = 48$

has the general solution:
 * $\tuple {x, y} = \tuple {16 + 256 t, 2 + 35 t}$

Proof
We use Solution of Linear Diophantine Equation.

Using the Euclidean Algorithm:

Hence we see that $\gcd \set {35, -256} = 1$ which trivially divides $48$, and so there exists a solution.

Again with the Euclidean Algorithm:

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


 * $\tuple {x, y} = \tuple {-5616 + \paren {-256} t, -768 - 35 t}$

for $t \in \Z$.

This can be simplified by setting $t \to -t$, thus
 * $\tuple {x, y} = \tuple {-5616 + 256 t, -768 + 35 t}$

We have that:
 * $-5616 + 22 \times 256 = 16$

and:
 * $-768 + 22 \times 35 = 2$

hence giving us the answer in smallest positive integer $\tuple {x, y}$:


 * $\tuple {x, y} = \tuple {16 + 256 t, 2 + 35 t}$