1

It is well known that the equation $ax+by = n$ has a solution in integers $x$ and $y$ iff $gcd(a,b)|n$. I would like to know if there is a theorem in number theory to show that there is a relationship between $x$ and $y$. An example of such a relationship might be their being relatively prime or something similar to that.

3 Answers3

0

If $ax+by=d\mid n$ for $d=gcd(a,b)$, then we must have $gcd(x,y)=1$. So in this case the solutions $x$ and $y$ are relatively prime, see this MSE-question.

Dietrich Burde
  • 130,978
0

Consider any pair $(x_0,y_0)$ and any pair $(a,b).$ Define $n=ax_0+by_0.$ We have that $(x_0,y_0)$ is a solution of $ax+by=n.$ Since the pair $(x_0,y_0)$ is arbitrary you can't expect any relation in general.

Edit

What we can say is that $gcd(x_0,y_0)|n.$ Why? Because the equation $x_0x+y_0y=n$ has solution: $(a,b).$

mfl
  • 29,399
0

Not always there are solutions because if $(a,b)=d\gt 1$ then it is clear that $d$ must divide $n$. When there is a solution $(x_0,y_0)$ you have $$\begin{cases}ax+by=n\\ax_0+by_0=n\end{cases}\Rightarrow a(x-x_0)+b(y-y_0)=0\Rightarrow\begin{cases}x-x_0=bt\\y-y_0=at\end{cases}$$ which gives a parametrization of $x$ and $y$ in function of $t$.

Piquito
  • 29,594