
6. For a given prime $p$, determine the number of tuples $(a, b, c)$, consisting of numbers from the set $\left\{1,2,3, \ldots, 2 p^{2}\right\}$, which satisfy

$$
\frac{[a, c]+[b, c]}{a+b}=\frac{p^{2}+1}{p^{2}+2} \cdot c,
$$

where $[x, y]$ denotes the least common multiple of $x$ and $y$.


Solution. Let us transform the equation using the well-known relation $(x, y) \cdot[x, y]=$ $x \cdot y$, where $(x, y)$ is the greatest common divisor of $x$ and $y$. If we denote $u=(a, c)$, and $v=(b, c)$ then the LHS reads

$$
\frac{[a, c]+[b, c]}{a+b}=\frac{a c / u+b c / v}{a+b}=\left(\frac{a}{u}+\frac{b}{v}\right) \cdot \frac{c}{a+b} .
$$

Thus the original equation is equivalent to (after the multiplication with $(a+b) / c$ )

$$
\frac{a}{u}+\frac{b}{v}=\frac{p^{2}+1}{p^{2}+2} \cdot(a+b)
$$

Since $p^{2}>0$ we have the following estimates for the RHS

$$
\frac{1}{2}<\frac{p^{2}+1}{p^{2}+2}<1
$$

consequently

$$
\frac{a+b}{2}<\frac{a}{u}+\frac{b}{v}<a+b
$$

The left inequality implies $u$ and $v$ cannot both be greater than 1 , as inequalities $u \geqslant 2$ and $v \geqslant 2$ imply

$$
\frac{a}{u}+\frac{b}{v} \leqslant \frac{a+b}{2}
$$

On the other hand, the right inequality excludes $u=v=1$, thus exactly one of $u$ and $v$ is 1 . Due to symmetry it is sufficient to deal with $u=1$ and $v \geqslant 2$.

Since $v=(b, c)$, we have $b / v=b_{1}$, with positive integer $b_{1}$. We substitute $u=1$ and $b=b_{1} v$ into (1) and solve it with respect to $a$ :

$$
\begin{aligned}
a+b_{1} & =\frac{p^{2}+1}{p^{2}+2} \cdot\left(a+b_{1} v\right), \\
\left(p^{2}+2\right)\left(a+b_{1}\right) & =\left(p^{2}+1\right)\left(a+b_{1} v\right), \\
a & =b_{1}\left(\left(p^{2}+1\right) v-p^{2}-2\right) .
\end{aligned}
$$

If $v \geqslant 3$ then from the last equation

$$
a \geqslant\left(p^{2}+1\right) v-p^{2}-2 \geqslant 3\left(p^{2}+1\right)-p^{2}-2=2 p^{2}+1,
$$

which is a contradiction, as $a \in\left\{1,2,3, \ldots, 2 p^{2}\right\}$.

Hence we have $v=2$ and (3) becomes

$$
a=b_{1}\left(2\left(p^{2}+1\right)-p^{2}-2\right)=p^{2} b_{1},
$$

which is easy to solve with $a$ in the given domain. Since $a \leqslant 2 p^{2}$ we have $b_{1} \leqslant 2$ and since $u=(a, c)=1$ and $v=(b, c)=2$ we have $c$ is even and relatively prime with a. Further $a=p^{2} b_{1}$ implies $b_{1}=1$ and $p$ is an odd prime. Hence $a=p^{2} b_{1}=p^{2}$ and $b=b_{1} v=1 \cdot 2=2$, which means $c$ is even and not a multiple of $p$. There are $p^{2}-p$ such numbers in $\left\{1,2,3, \ldots, 2 p^{2}\right\}$ and the tuples $(a, b, c)=\left(p^{2}, 2, c\right)$ are the solutions of the given equation. Because of the symmetry there is the same number of the solutions of the form $(a, b, c)=\left(p^{2}, 2, c\right)$. tuples.

Conclusion: There are no tuples if $p=2$. If $p$ is an odd prime, there are $2\left(p^{2}-p\right)$

First Round of the 59th Czech and Slovak Mathematical Olympiad (December 1st, 2009)

![](https://cdn.mathpix.com/cropped/2024_04_17_10b455106c778bb0ba10g-09.jpg?height=161&width=390&top_left_y=323&top_left_x=515)
