Given two positive integers a,b what is the minimal integer n, so that there exist two positive integers u,v for which n=au=av?
It is easy to verify that n=ab/gcd(a,b).
But what happens if instead of requiring au=bv, or |au-bv|≤0, we require that |au-bv|≤k for some number k?
That is, given two positive integers a,b, what are the minimal integers u,v for which |au-bv|≤k, for some k? If there's no direct formula, is there an easy way to find u,v?

