The divisions in the Euclidean algorithm are
The last nonzero remainder is , so
As a check, and ; back-substitution also gives .
At any division step , an integer divides both exactly when it divides both : one direction uses , and the other uses . Hence
Starting with , , the Euclidean division produces
The nonzero remainders form a strictly decreasing sequence of positive integers. Such a sequence must terminate, since there are only finitely many positive integers below . Suppose is the last nonzero remainder, so . The unchanged greatest common divisor at each step gives
The final equality holds because the positive common divisors of and are precisely the positive divisors of . This proves both termination and correctness of the Euclidean algorithm.

Articles by others on the same topic (0)

There are currently no matching articles.