Suppose that, for given integers $a$ and $b$, there exist integers $x$ and $y$ satisfying $ax + by = 6$. What are all the possible values of $\gcd(a, b)$?
Progress, we know that since $ax + by = 6$, then $x = (6 - by)/a$. In order for $x$ to be an integer, $6 - by$ must be some multiple of a. Similarly, $y = (6 - ax)/b$, so $6 - ay$ must be some multiple of $b$. Then for some integer $q$, $aq = 6 - by$. For some integer $r$, $br = 6 - ay$. Then $b = (6 - ay)/r$ and back substituting gives us $y = (6 - ax)/[(6 - ay)/r] = r(6 - ax)/(6 - ay)$. Thus $6y - ay^2 = r(6 - ax)$ and so we have the quadratic... I'm in a mess, any help and/or advice would greatly be appreciated.