# Linear Diophantine eq. in three variables [duplicate]

I'm solving this equation in integers: $$6 \, x + 10 \, y + 15 \, z = 1$$.

I can find many solutions, by combining two two-variable equations into $$x = u \, p$$, $$y = v \, p$$, $$z = q$$, where $$u = 2 + 5 \, t$$, $$v = -1 - 3 \, t$$, and $$p = 8 + 15 \, s$$, $$q = -1 - 2 \, s$$, with $$s$$ and $$t$$ integers. (see Wikipedia)

But I'm obviously missing some solutions. How does Mathematica arrive at this elegant general solution?

• @DietrichBurde Probably. I had searched for such an answer without success.
– BoLe
Commented Nov 13, 2020 at 12:09
• I added a link which gives the general method. Commented Nov 13, 2020 at 23:10
• @BillDubuque Thanks. Second link proves especially useful, as Adam Bailey there suggests simple modular arithmetic which readily leads to a desired general solution.
– BoLe
Commented Nov 14, 2020 at 12:35
• The remark you refer to is a part of the general (recursive) algorithm that I describe there (which works for any number of variables). But the algorithm involves (much) more than that simple remark, so I highly suggest that you learn the (ideas behind) the general algorithm if you wish to master such. Commented Nov 14, 2020 at 20:51