Maths WorkshopMaths problems with full solutions
Exercise 741Number theory › Divisibility and gcdHigh schoolAdded 2 Nov 2026

Bézout identity for 1001 and 315

#Euclidean algorithm#Bézout identity

Statement

Compute \divisibility(1001,315)\divisibility(1001,315) and find a Bézout identity.

Hint

Apply the Euclidean algorithm and back-substitute.

Show solutionHide solution

Solution

Euclidean algorithm.
\begin{align*}
1001 &= 3\cdot315+56,\\
315 &= 5\cdot56+35,\\
56 &= 1\cdot35+21,\\
35 &= 1\cdot21+14,\\
21 &= 1\cdot14+7,\\
14 &= 2\cdot7+0.
\end{align*}
So \divisibility(1001,315)=7\divisibility(1001,315)=7.

Back-substitution.
\begin{align*}
7 &= 21-14\\
&=21-(35-21)=2\cdot21-35\\
&=2(56-35)-35=2\cdot56-3\cdot35\\
&=2\cdot56-3(315-5\cdot56)=17\cdot56-3\cdot315\\
&=17(1001-3\cdot315)-3\cdot315\\
&=17\cdot1001-54\cdot315.
\end{align*}
So 17⋅1001−54⋅315=717\cdot1001-54\cdot315=7.