Consider the Diophantine equation $$k_0a+k_1b+k_2c+k_3d+\cdots=1$$ where $a,b,c,d,\cdots$ are variables and suppose that a solution obtained through the Euclidean Algorithm is $a_0,b_0,c_0,d_0,\cdots$.

What is the general solution for $a,b,c,d,\cdots$?

If we take a step back and consider such an equation with two variables, then for $$k_0a+k_1b=1$$ we get the general solution $a=a_0+k_1t$ and $b=b_0-k_0t$ for some integer $t$.

How should one deal with this for an equation with more than two variables?

P.S. Finding one solution isn't a problem as we could pair up $(a,b)$, $(c,d)$ and then use the Extended Euclidean Algorithm.

  • $\begingroup$ You can find the solution to this problem in "Diophantine Equations" by L.J. Mordell. Academic Press p. 30-31 (1969) $\endgroup$
    – Piquito
    Oct 17, 2018 at 19:07

1 Answer 1


You can use:

$a = a_0 + k_1 t_1 + k_2 t_2 + …$

$b = b_0 - k_0 t_1$

$c = c_0 - k_0 t_2$


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.