Maths WorkshopMaths problems with full solutions
Exercise 1485Number theory › Diophantine equationsL1Added 2 Nov 2026

Solving a linear Diophantine equation

#Diophantine equation#Bézout#particular solution

Statement

Solve in integers the equation
1263x+420y=21.1263x+420y=21.

Hint

Compute \divisibility(1263,420)\divisibility(1263,420) and find a particular solution using Bézout, then add the general solution of the homogeneous equation.

Show solutionHide solution

Solution

divisibility. Euclidean algorithm:
\begin{align*}
1263 &= 3\cdot420+3,\\
420 &= 3\cdot140+0.
\end{align*}
So \divisibility(1263,420)=3\divisibility(1263,420)=3, which divides 2121, so solutions exist.

Bézout. From the first line, 3=1263−3⋅4203=1263-3\cdot420. Multiplying by 77:
21=7⋅1263−21⋅420.21=7\cdot1263-21\cdot420.
So (x0,y0)=(7,−21)(x_0,y_0)=(7,-21) is a particular solution.

General solution. The homogeneous equation 1263x+420y=01263x+420y=0 gives x=140mx=140m, y=−421my=-421m (after dividing by \divisibility=3\divisibility=3). Hence
(x,y)=(7+140m, −21−421m),m∈Z.(x,y)=(7+140m,\,-21-421m),\qquad m\in\mathbb{Z}.

Remark. This is the corrected partiel exercise from Paris Diderot.