Functional Equation $f(mn)=f(m)f(n)$.

Solution 1:

I do believe your answer $24$ is correct. The functionnal $f(mn) = f(m)f(n)$ has the awesome characteristic to be totally powerless towards prime numbers. Really, if $p$ is prime, you can assign $f(p)$ whichever prime value you want, and you are sure to not make collisions if you select a different prime for all the prime numbers.

It is even more powerful than that : since the prime number decomposition always exists and is unique, giving a value to all the prime numbers defines $f$.

As you said, $f(999) = f(3)^3f(37)$ so the weight of $f(3)$ is higher than the weight of $f(37)$. It is then minimal to say that $f(3) = 2$ and $f(37) = 3$, $2$ and $3$ being the smallest numbers above $1$ (and happen to be prime, which simplifies the mapping). Then $f(999) = 24$.

EDIT : @Henry suggested to complete the map with $f(2) = 37 ; f(3) = 2 ; f(37) = 3 ; f(p) = p$ if $p$ is prime and different of $2,3,37$ which is totally correct. Of course, $f(1) = 1$ and $f(0) = 0$.