## Task 4.

Let $d(n)$ denote the number of positive divisors of the number $n$, and $s(n)$ the sum of all positive divisors of the number $n$. Determine all natural numbers $n$ for which

$$
4 s(n)=3 d(n)^{2}+1
$$
## First solution.

Obviously, $n=1$ is a solution. We further consider $n>1$. Since the left side of the equation is even, the right side must also be even, so we conclude that $d(n)$ is odd, which means that $n$ is a perfect square. Let $m$ be a natural number such that $n=m^{2}$. If $k$ is a divisor of $n$, then $\frac{n}{k}$ is also a divisor of $n$, so we conclude that $m^{2}$, along with $m$, has $\frac{d(n)-1}{2}$ divisors greater than $m$ and $\frac{d(n)-1}{2}$ divisors less than $m$. Since there are only $m-1$ natural numbers less than $m$, we conclude that $\frac{d(n)-1}{2} \leqslant m-1$, or

$$
d(n) \leqslant 2 m-1
$$

Equality holds only if all numbers $1,2, \ldots, m$ are divisors of $n$.

On the other hand, we can bound $s(n)$ from below. All divisors that are not $1, m$, and $m^{2}$ can be paired, and by the AM-GM inequality, we have $k+\frac{n}{k} \geqslant 2 m$. We get

$$
s(n) \geqslant 1+m^{2}+(d(n)-2) m
$$

Note that equality holds if and only if equality is achieved in each applied AM-GM inequality, which is possible only if $d(n)=3$. Using the shown inequalities, we get

$$
\begin{aligned}
4\left(1+m^{2}+(d(n)-2) m\right) & \leqslant 4 s(n) \\
& =3 d(n)^{2}+1 \\
& \leqslant 3(2 m-1) d(n)+1 \\
& =4 m d(n)+(2 m-3) d(n)+1 \\
& \leqslant 4 m d(n)+(2 m-3)(2 m-1)+1 \\
& =4\left(1+m^{2}+(d(n)-2) m\right)
\end{aligned}
$$

We see that equality must hold in all used inequalities, so it is necessary that $d(n)=3$. By substitution, we see that $s(n)=7$, and by checking for $n \in\{2,3,4,5,6\}$, we see that 4 is the only solution besides 1.

Therefore, the solutions are 1 and 4.