Theorem
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.
Note
This algorithm leads to the notion of the Greatest Common Divisor, where d=gcd(a,b) is the largest number that divided both a and b. # 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=q1ār+r1ā=qkārkā1ā+rkāārkā=(a,b)ā This implies that āx,yāZ such that rkā=ax+by.