Linear Diophantine equations with fractional coefficients

Solution 1:

Let $a,b\in\Bbb{Q}$ be given, and let $r\in\Bbb{Q}$ be the largest rational number such that for all $m,n\in\Bbb{Z}$, there exists some $k\in\Bbb{Z}$ such that $$am+bn=rk.$$ Writing $a=\tfrac uv$ and $b=\tfrac xy$ with $u,v,x,y\in\Bbb{Z}$ and $\gcd(u,v)=\gcd(x,y)=1$, then indeed $$r=\frac{\gcd(uy,vx)}{vy}.$$ Because $\gcd(u,v)=\gcd(x,y)=1$ you have $$\gcd(uy,xv)=\gcd(u,x)\cdot\gcd(v,y).$$ Then from the identity $vy=\gcd(v,y)\cdot\operatorname{lcm}(v,y)$ it follows that $$r=\frac{\gcd(uy,vx)}{vy}=\frac{\gcd(u,x)}{\operatorname{lcm}(v,y)}.$$ I am not aware of any name for this particular expression.