Finding pair of natural numbers such that when used in two fractions, results in natural numbers Determine all pairs of natural numbers (a, b) such that $\frac{3a + 8b + 2}{10a + 2b + 1}$ and $\frac{8a + b + 3}{2a + 7b + 3}$ are also natural numbers (including 0).
This implies that gcd$(3a + 8b + 2, 10a + 2b + 1) = 10a + 2b + 1$ so let $3a + 8b + 2 = m(10a + 2b + 1)$.
Similarly, gcd$(8a + b + 3, 2a + 7b + 3) = 2a + 7b + 3$ so let $8a + b + 3 = n(2a + 7b + 3)$.
Then I tried setting up a system of equations to find $m$ and $n$, but it yielded no solutions. It could be that there are no solutions, but I'm thinking that I did something wrong. Does anybody know how to approach this question?

Both fractions are positive for all $a,b\in\Bbb{N}$. Therefore we can deduce that they are $\ge1$.
So $3a+8b+2\ge10a+2b+1$ implying that $6b+1\ge7a$. But we also have $8a+b+3\ge2a+7b+3$, implying that $a\ge b$. Together these imply that $b\in\{0,1\}$ (do you see why?) and I'm sure you can do the rest. There are exactly two pairs $(a,b)$ meeting the requirements.
