13. (BUL) ${ }^{\mathrm{IMO} 6}$ Determine the least possible value of $f(1998)$, where $f$ is a function from the set $\mathbb{N}$ of positive integers into itself such that for all $m, n \in \mathbb{N}$,  
$$ f\left(n^{2} f(m)\right)=m[f(n)]^{2} $$
13. Denote by $\mathcal{F}$ the set of functions considered. Let $f \in \mathcal{F}$, and let $f(1)=a$. Putting $n=1$ and $m=1$ we obtain $f(f(z))=a^{2} z$ and $f\left(a z^{2}\right)=f(z)^{2}$ for all $z \in \mathbb{N}$. These equations, together with the original one, imply $f(x)^{2} f(y)^{2}=f(x)^{2} f\left(a y^{2}\right)=f\left(x^{2} f\left(f\left(a y^{2}\right)\right)\right)=f\left(x^{2} a^{3} y^{2}\right)=$ $f\left(a(a x y)^{2}\right)=f(a x y)^{2}$, or $f(a x y)=f(x) f(y)$ for all $x, y \in \mathbb{N}$. Thus $f(a x)=a f(x)$, and we conclude that  $$ a f(x y)=f(x) f(y) \quad \text { for all } x, y \in \mathbb{N} $$  We now prove that $f(x)$ is divisible by $a$ for each $x \in \mathbb{N}$. In fact, we inductively get that $f(x)^{k}=a^{k-1} f\left(x^{k}\right)$ is divisible by $a^{k-1}$ for every $k$. If $p^{\alpha}$ and $p^{\beta}$ are the exact powers of a prime $p$ that divide $f(x)$ and $a$ respectively, we deduce that $k \alpha \geq(k-1) \beta$ for all $k$, so we must have $\alpha \geq \beta$ for any $p$. Therefore $a \mid f(x)$. Now we consider the function on natural numbers $g(x)=f(x) / a$. The above relations imply  $$ g(1)=1, \quad g(x y)=g(x) g(y), \quad g(g(x))=x \quad \text { for all } x, y \in \mathbb{N} $$  Since $g \in \mathcal{F}$ and $g(x) \leq f(x)$ for all $x$, we may restrict attention to the functions $g$ only. Clearly $g$ is bijective. We observe that $g$ maps a prime to a prime. Assume to the contrary that $g(p)=u v, u, v>1$. Then $g(u v)=p$, so either $g(u)=1$ and $g(v)=1$. Thus either $g(1)=u$ or $g(1)=v$, which is impossible. We return to the problem of determining the least possible value of $g(1998)$. Since $g(1998)=g\left(2 \cdot 3^{3} \cdot 37\right)=g(2) \cdot g(3)^{3} \cdot g(37)$, and $g(2)$, $g(3), g(37)$ are distinct primes, $g(1998)$ is not smaller than $2^{3} \cdot 3 \cdot 5=120$. On the other hand, the value of 120 is attained for any function $g$ satisfying (2) and $g(2)=3, g(3)=2, g(5)=37, g(37)=5$. Hence the answer is 120.