Bezout

Returns the greatest common divisor and the coefficients of Bezout's lemma: let a and b nonzero integers and let d be their greatest common divisor. Then there exist integers x and y such that ax+by=d.

Syntax

bezout(Integer, Integer)

Description

Given two nonzero integers aLaTeXa and bLaTeXb, returns a vector: the first element is the greatest common divisor, the second element is xLaTeXx and the third one is yLaTeXy, following the notation above.

arithmetic.bezout.calc.png