Let $d(n)$ denote the number of positive divisors of a positive integer $n$. What is the smallest real value of $c$ such that $d(n) \leq$ $c \cdot \sqrt{n}$ holds for all positive integers $n$?
Solution. We are looking for the smallest $c$ such that $c \geq \frac{d(n)}{\sqrt{n}}$ holds for all positive integers $n$. We know that if the canonical form of $n$ is $n=p_{1}^{\alpha_{1}} \cdot p_{2}^{\alpha_{2}} \cdot \ldots \cdot p_{k}^{\alpha_{k}}$, then the number of divisors of $n$ is $d(n)=\left(\alpha_{1}+1\right)\left(\alpha_{2}+1\right) \ldots\left(\alpha_{k}+1\right)$. Therefore,

$$
c^{2} \geq \frac{d(n)^{2}}{n}=\frac{\left(\alpha_{1}+1\right)^{2}\left(\alpha_{2}+1\right)^{2} \ldots\left(\alpha_{k}+1\right)^{2}}{p_{1}^{\alpha_{1}} \cdot p_{2}^{\alpha_{2}} \cdot \ldots \cdot p_{k}^{\alpha_{k}}}=\frac{\left(\alpha_{1}+1\right)^{2}}{p_{1}^{\alpha_{1}}} \cdot \ldots \cdot \frac{\left(\alpha_{k}+1\right)^{2}}{p_{k}^{\alpha_{k}}}
$$

To find the smallest $c$ as described in the problem, it is necessary to maximize the right-hand side of (1). (More precisely, we need to find its supremum, but as we will see, this means maximizing it.) The right-hand side of (1) will be the largest when for each prime $p_{i}$, we choose an exponent $\alpha_{i} \in\{0,1,2, \ldots\}$ that maximizes

$$
\frac{\left(\alpha_{i}+1\right)^{2}}{p_{i}^{\alpha_{i}}}=\frac{(2 / 1)^{2}}{p_{i}} \cdot \frac{(3 / 2)^{2}}{p_{i}} \cdot \frac{(4 / 3)^{2}}{p_{i}} \cdot \ldots \cdot \frac{\left(\left(\alpha_{i}+1\right) / \alpha_{i}\right)^{2}}{p_{i}}
$$

The numerators of the fractions on the right-hand side of (2) strictly decrease, and their denominators are the same, so the product will be maximal if $\alpha_{i}$ is chosen such that the product includes exactly the

factors of the form $\frac{((s+1) / s)^{2}}{p_{i}}$ that are greater than 1. If $p_{i}>4$, then even the first factor of the product is less than 1. Therefore, if we omit the prime factors greater than 4 from the canonical form of a number, the ratio $d(n) / \sqrt{n}$ increases. Thus, it is sufficient to consider only those numbers whose prime factors can only be 2 and 3. The exponents of the prime factors 2 and 3 that maximize the expression can also be obtained by considering the above; note that

$$
\frac{(3 / 2)^{2}}{2}>1>\frac{(4 / 3)^{2}}{2}, \quad \text { and } \quad \frac{(2 / 1)^{2}}{3}>1>\frac{(3 / 2)^{2}}{3}
$$

This means that the expression $\frac{d(n)}{\sqrt{n}}$ is maximized for $n=2^{2} \cdot 3=12$. Therefore, the smallest $c$ we are looking for is

$$
c=\frac{d(12)}{\sqrt{n}}=\frac{3 \cdot 2}{\sqrt{4 \cdot 3}}=\frac{3 \cdot 2}{2 \sqrt{3}}=\frac{3}{\sqrt{3}}=\sqrt{3}
$$

Remark. Using the method of the solution, it can be shown that for any positive $\varepsilon$ exponent, there exists a number $c_{\varepsilon}$ such that $d(n) \leq c_{\varepsilon} \cdot n^{\varepsilon}$ holds for all positive integers $n$, and there is a positive integer $n_{\varepsilon}$ for which equality holds. This also implies that for any $\varepsilon>0$,

$$
\lim _{n \rightarrow \infty} \frac{d(n)}{n^{\varepsilon}}=0
$$

This can also be stated as $\log d(n) / \log n \rightarrow 0$ as $n \rightarrow \infty$. (It can be assumed that we are talking about the natural logarithm, since the base (greater than 1) does not affect the fact of convergence or the limit value.) It is worth noting that the stronger statement is also true that there exists a constant $C$ such that for all positive integers $n$:

$$
\frac{\log d(n)}{\log n}<\frac{C}{\log \log n}
$$

This upper bound is essentially sharp and cannot be improved further. This can be seen by examining numbers of the form $n=p_{1} p_{2} \ldots p_{k}$, where $p_{1}<p_{2}<\ldots<p_{k}<\ldots$ is the sequence of consecutive primes. Thus, the above inequality is essentially sharp when $n$ is the product of the first $k$ primes.