Bezout’s Identity (but discovered earlier, in a restricted form, by Bachet) is the following result.
Theorem: Let $a$ and $b$ be nonzero integers and let $d$ be their greatest common divisor. Then there exist integers $x$ and $y$ such that $$ax+by=d.$$ In addition, the greatest common divisor $d$ is the smallest positive integer that can be written as $ax + by$, and every integer of the form $ax + by$ is a multiple of the greatest common divisor $d$.
Many theorems in elementary number theory are a result of this one (e.g., Euclid's lemma, the Chinese remainder theorem).
I’m looking for interesting or creative applications of Bezout’s Identity to prove number theory results. One example is Catalan’s “complete integer solution” of the 2.2.3 equation $$X_1^2+X_2^2=Y_1^2+Y_2^2+Y_3^2, \tag{1}$$ which he gave as follows.
Choose relatively prime integers $\alpha$ and $\beta$, and integers $u$ and $v$ such that $\beta u - \alpha v = 1$. Then all integer solutions of (1) are given, without repetition, by the formulas \begin{align*} x_1 &= \tfrac{1}{2}(\alpha^2 + \beta^2 + y_3^2)u + \beta \theta, & y_1 &= x_1 + \alpha, \\ x_2 &= \tfrac{1}{2}(\alpha^2 + \beta^2 + y_3^2)v + \alpha \theta, & y_2 &= x_2 - \beta, \end{align*} where $\theta$ is an arbitrary integer.
[cf. Dickson’s History, Vol II, p. 268; orig: Assoc franç., av. sc. 12, 1883, 98–101]
What other clever applications are there?