Solution of Linear Diophantine Equation

Theorem
The linear Diophantine equation:
 * $$ax + by = c$$

has solutions iff $$\gcd \left\{{a, b}\right\} \backslash c$$.

If this condition holds with $$\gcd \left\{{a, b}\right\} > 1$$ then division by $$\gcd \left\{{a, b}\right\}$$ reduces the equation to:
 * $$a' x + b' y = c'$$

where $$\gcd \left\{{a', b'}\right\} = 1$$.

If $$x_0, y_0$$ is one solution of the latter equation, then the general solution is:
 * $$\forall k \in \Z: x = x_0 + b' k, y = y_0 - a' k$$.

Proof
The first part of the problem is a direct restatement of Bézout's Identity:

The set of all integer combinations of $$a$$ and $$b$$ is precisely the set of all integer multiples of the GCD of $$a$$ and $$b$$:


 * $$\gcd \left\{{a, b}\right\} \backslash c \iff \exists x, y \in \Z: c = x a + y b$$