## Task B-3.6.

Mr. Algebrić decided to encourage his two sons to solve a problem, so he said that they would determine their own pocket money for going out in the following way. From the set $\left\{5,5^{2}, 5^{3}, \ldots, 5^{33}\right\}$, they need to choose two different numbers, $a$ and $b$, such that $\log _{a} b$ is an integer. Each of them will receive as many kuna as the number of such pairs of numbers they write. How much kuna could one of them earn at most?
## Solution.

Let $a=5^{x}, b=5^{y}$, where $x$ and $y$ are numbers from the set $\{1,2,3, \ldots, 32,33\}$. Then,

$$
\log _{a} b=\log _{5^{x}} 5^{y}=\frac{y}{x}
$$

This fraction will be an integer if and only if $y$ is a multiple of $x$, greater than $x$, and less than or equal to 33. We have the following cases:

$$
\begin{aligned}
& x=1 \Rightarrow y \in\{2,3, \ldots, 33\} \text { which is a total of } 32 \text { pairs of the form }(1, y) . \\
& x=2 \Rightarrow y \in\{4,6,8, \ldots, 32\} \text { which is a total of }\left\lfloor\frac{33}{2}\right\rfloor-1=15 \text { pairs of the form }(2, y) . \\
& x=3 \Rightarrow y \in\{6,9,12 \ldots, 33\} \text { which is a total of }\left\lfloor\frac{33}{3}\right\rfloor-1=10 \text { pairs of the form }(3, y) . \\
& x=4 \Rightarrow y \in\{8,12,16 \ldots, 32\} \text { which is a total of }\left\lfloor\frac{33}{4}\right\rfloor-1=7 \text { pairs of the form }(4, y) . \\
& x=5 \Rightarrow y \in\{10,15,20,25,30\} \text { which is a total of }\left\lfloor\frac{33}{5}\right\rfloor-1=5 \text { pairs of the form }(5, y) . \\
& x=6 \Rightarrow y \in\{12,18,24,30\} \text { which is a total of }\left\lfloor\frac{33}{6}\right\rfloor-1=4 \text { pairs of the form }(6, y) . \\
& x=7 \Rightarrow y \in\{14,21,28\} \text { which is a total of }\left\lfloor\frac{33}{7}\right\rfloor-1=3 \text { pairs of the form }(7, y) \\
& x=8 \Rightarrow y \in\{16,24,32\} \text { which is a total of }\left\lfloor\frac{33}{8}\right\rfloor-1=3 \text { pairs of the form }(8, y) .
\end{aligned}
$$

Multiples of the numbers $9,10,11$ less than 33 are each 2, and multiples of the numbers $12,13,14,15,16$ are each 1.

The total number of pairs is

$$
32+15+10+7+5+4+3+3+3 \cdot 2+5 \cdot 1=90
$$

We conclude that one of the sons can earn a maximum of 90 kn.