A diophantine equation of coprime integers I conjecture that for two coprime integers $a$ and $b$, for any integer $n$ coprime to $a$ and $b$ they exist integers $x$ and $y$ such that

*

*$ax + by = n$

*$a,b,x,y,n$ are pairwise coprime

I am having problems to prove it, specially with the second condition, although numerical experimentation seems to support it. Bezout's identity doesn't guarantee it, and the only cases I have been able to identify that for sure holds for any $a,b,x,y,n$ are $x=\pm 1$ and $y=\pm 1$ for $n=\pm (a\pm b)$. I believe it could be a good starting point for some kind of inductive argument, but I have not been able to make it work in a way that guarantees the second condition.
Any help or hint to prove this conjecture, or some counterexample to it, would be welcomed.
Thanks!
 A: We can assume without loss of generality that $\ n>0\ $, since if $\ a,b,x,y,n\ $ satisfy all the given conditions, then so do $\ a,$$\,b,$$\,{-}x,$$\,{-}y,$$\,{-}n\ $.
Using the extended Euclidean algorithm we can find integers $\ x_0,y_0\ $ such that
$$
x_0a+ y_0b=1\ .
$$
The integer $\ x_0\ $ must be relatively prime to $\ b\ $, and $\ y_0\ $ must be relatively prime to $\ a\ $.  From the Chinese remainder theorem, it follows that there exists an integer $\ t\ $ such that
\begin{align}
t&\equiv -b^{-1}\pmod{n}\ \ , \ \ \ \ \text{ and}\\
t&\equiv b^{-1}(nx_0-1)\pmod{a}\ .
\end{align}
Let
\begin{align}
x=&nx_0-tb - kabn\ , \ \ \text{ and}\\
y=&ny_0+at+ka^2n\  
\end{align}
where $\ k $ is an integer which remains to be chosen. But whatever the value of $\ k\ $,
$$
xa+yb=n\ ,
$$
$\ x\ $ is relatively prime to $\ b\ $, and $\ y\ $ is relatively prime to $\ a\ $,
\begin{align}
x&\equiv1\pmod{n}\ ,\text{ and}\\
x&\equiv1\pmod{a}\ ,\\
y&\equiv ny_0+at\equiv -b^{-1}a \pmod{n}\ .
\end{align}and hence $\ x\ $ is relatively prime to $\ a\ $ and $\ n\ $ and $\ y\ $ is relatively prime to $\ n\ $.  Since $\ a\ $ and $\ n\ $ are relatively prime to $\ b\ $ there is an integer $\ k\ $ such that
$$
y=y_0+at+ka^2n\equiv1\pmod{b}\ .
$$
Therefore, if we choose this $\ k\ $ in the equations for $\ x\ $ and $\ y\ $ above, then $\ y\ $ will be relatively prime to $\ b\ $ and the integers $\ a,b,x,y,n\ $ will satisfy all the given conditions.
