Exercise 4. Find all pairs $(a, b)$ of natural numbers such that:

$$
\mathrm{ab}+85=12 \cdot \operatorname{lcm}(\mathrm{a}, \mathrm{b})+20 \cdot \operatorname{gcd}(\mathrm{a}, \mathrm{b})
$$
## Solution to Exercise 4

We use the relation $\operatorname{ppcm}(a, b) \cdot \operatorname{pgcd}(a, b)=a b$. Let $p=\operatorname{ppcm}(a, b)$ and $q=\operatorname{pgcd}(a, b)$. By substituting into the initial equation, we reduce it to:

$$
p q+85=12 p+20 q
$$

We can factorize this equation as:

$$
(p-20)(q-12)=155=5 \cdot 31
$$

Since 5 and 31 are prime numbers, we have identified that the only divisors of 155 are $1, 5, 31$, and 155. Thus, the numbers $p-20$ and $q-12$ belong to the set $\{ \pm 1, \pm 5, \pm 31, \pm 155\}$. We then have 8 cases to consider:

Case 1: $\left\{\begin{array}{l}p-20=1 \\ q-12=155\end{array} \Longleftrightarrow\left\{\begin{array}{l}p=21 \\ q=167\end{array}\right.\right.$

Case 2: $\left\{\begin{array}{l}p-20=5 \\ q-12=31\end{array} \Longleftrightarrow\left\{\begin{array}{l}p=25 \\ q=43\end{array}\right.\right.$

Case 3: $\left\{\begin{array}{l}p-20=31 \\ q-12=5\end{array} \Longleftrightarrow\left\{\begin{array}{l}p=51 \\ q=17\end{array}\right.\right.$

Case 4: $\left\{\begin{array}{l}p-20=155 \\ q-12=1\end{array} \Longleftrightarrow\left\{\begin{array}{l}p=175 \\ q=13\end{array}\right.\right.$

Case 5: $\left\{\begin{array}{l}p-20=-1 \\ q-12=-155\end{array} \Longleftrightarrow\left\{\begin{array}{l}p=19 \\ q=-143\end{array}\right.\right.$

Case 6: $\left\{\begin{array}{l}p-20=-5 \\ q-12=-31\end{array} \Longleftrightarrow\left\{\begin{array}{l}p=15 \\ q=-19\end{array}\right.\right.$

Case 7: $\left\{\begin{array}{l}p-20=-31 \\ q-12=-5\end{array} \Longleftrightarrow\left\{\begin{array}{l}p=-11 \\ q=7\end{array}\right.\right.$

Case 8: $\left\{\begin{array}{l}p-20=-155 \\ q-12=-1\end{array} \Longleftrightarrow\left\{\begin{array}{l}p=-135 \\ q=11\end{array}\right.\right.$

Here, it is important to be careful and to verify which of these solutions work. The last 4 cases cannot work as they provide negative integers as solutions. For the first 4 cases, we recall that $p=\operatorname{ppcm}(a, b)$ and $q=\operatorname{pgcd}(a, b)$, which implies that $q$ must divide $p$. This is only satisfied in Case 3. We have $p=51=3 \cdot 17$ and $q=17$.

We can write $a$ and $b$ in the form $a=x q$ and $b=y q$ with $x$ and $y$ being coprime natural numbers by definition of the gcd. We also know that $a b=p q$, so $x y q^{2}=p q$ and thus $x y q=p$. Substituting the values of $p$ and $q$ into this equation, we get $x y=3$, so $x=1$ and $y=3$ or $x=3$ and $y=1$. Since $a=17 x$ and $b=17 y$, we have two possible solutions: $(a, b)=(17,51)$ or $(a, b)=(51,17)$. We then verify that these two solutions are indeed valid, as $17 \cdot 51+85=952=12 \cdot 51+20 \cdot 17$.

Grader's Comment: The exercise is generally well understood, however, few students get full marks. Indeed, some forget to verify that the pairs found are solutions. Others obtain that $(\operatorname{ppcm}(a, b)-20)(\operatorname{pgcd}(a, b)-12)=155$, but do not consider the possibility that $\operatorname{ppcm}(a, b)-20$ and $\operatorname{pgcd}(a, b)-12$ can both be negative.