When do positive integers $0Let $k_1$ and $k_2$ be positive integers. When do positive integers $0<q_1<k_1$ and $0<q_2<k_2$ exist such that $q_1k_1+q_2k_2=k_1k_2$?
I believe that these exist precisely when gcd$(k_1,k_2) \neq 1$. Is this correct? Does somebody have a proof?
Examples: for $k_1=3, k_2=6$, one has $4 \cdot 3 + 1 \cdot 6 = 18 $ and $2 \cdot 3 + 2 \cdot 6 = 18 $. However, for $k_1=2$, $k_2=3$, this never seems to happen.
 A: Your assumption is indeed correct.
First, we show that it is a necessary condition:
Assume $GCD(k_1,k_2)=1$. If you take a look at your equation, we gain $k_2|q_1, k_1|q_2$ (why?). 
Since $q$ cannot be $0$, this leaves us with $q_1k_1+q_2k_2\geq k_1k_2+k_2k_1=2k_1k_2>k_1k_2$.
Now, to prove that our condition is sufficient, we say $k_1=l_1d, k_2=l_2d$, where $GCD(l_1,l_2)=1$.
Now the equation writes $d(q_1l_1+q_2l_2)=d^2l_1l_2 \Leftrightarrow q_1l_1+q_2l_2=dl_1l_2$.
If we say $q_1=l_2r_1, q_2=l_1r_2$, putting that in leaves us with $r_1+r_2=d$, which can be fulfilled due to $d>0$ and leaves us with a solution.
A: I am assuming that the conditions were $0\lt q_1\lt k_1$ and $0\lt q_2\lt k_2$ and $q_2k_1+q_1k_2=k_1k_2$. Otherwise, there is a counterexample.

If $(k_1,k_2)=d$ and $d\gt1$, then for each $0\lt j\lt d$, we have the solutions
$$
k_1k_2=\frac{jk_2}{d}k_1+\frac{(d-j)k_1}{d}k_2\tag{1}
$$
where $0\lt\frac{jk_2}{d}\lt k_2$ and $0\lt\frac{(d-j)k_1}{d}\lt k_1$.
Suppose that $a_1k_1+a_2k_2=1$ and that we have a solution
$$
k_1k_2=q_2k_1+q_1k_2\tag{2}
$$
where $0\lt q_1\lt k_1$ and $0\lt q_2\lt k_2$. Then
$$
\begin{align}
(k_2-q_2)k_1&=q_1k_2\\
a_2(k_2-q_2)k_1&=q_1(1-a_1k_1)\\
\left[a_2(k_2-q_2)+a_1q_1\right]k_1&=q_1\tag{3}
\end{align}
$$
Thus, $k_1\mid q_1$ which is not possible if $0\lt q_1\lt k_1$.
A: $$
(k_1-q_2)(k_2-q_1) = k_1k_2-k_1q_1-k_2q_2 +q_1q_2=q_1q_2
$$
