Theorem (Euclidean Algorithm)
Given a,b∈Z,b=0, then we can divide a by b such that ∃q,r, the quotient and remainder, such that a=bq+r with 0≤r<∣b∣. If r=0, b, is said to be a divisor of a.
Algorithm
The Euclidean (division) algorithm, allows us to find the gcd of any two numbers, a,b∈Z. Noting that (a,b)=(b,r) then we can recursively repeat the process until we reach a dead end (i.e. ri=0 for some iteration i). Suppose the process terminates after k+1 steps then ab⋮rk−2=qb+r=q1r+r1=qkrk−1+rkrk=(a,b) This implies that ∃x,y∈Z such that rk=ax+by.
Theorem (1.1)
For any two integers a,b with b=0 ∃x0,y0∈Z such that for d=(a,b) we have ax0+by0=dIt is clear that there are infinitely many such integers because given one pair x0,y0 we also have a(x0+tb)+b(y0−ta)=d ∀t∈Z.
Theorem (1.6)
For any two integers a,b∈Z with b=0, ∃x0,y0∈Z such that for d=(a,b), we have by Theorem 1.1 ax0+by0=dGiven this information we have that all integer solutions of ax+by=d are given by the parameterization xy=x0+dtb=y0−dta for t∈Z.