Section 1.3
Linear diophantine equations


We describe an algorithm to find all integer solutions to the equation

xa + yb = c

in the unknowns x, y and given a, b, c in Z. Such equations are known as linear diophantine equations. We first discuss a special case, the homogeneous equation. Let a, b Z.

Lemma

If xa + yb = 0 and gcd(a,b) = 1, then there exists an integer n such that

x = -nb   and   y = na.

From this we conclude the following.

Theorem

Suppose that a, b are not both 0. Then the integer solutions to the equation xa + yb = 0 are given by

x = -nb/d   and   y = na/d,

where d = gcd(a,b) and n in Z.