TITLE: Minimum possible value of $f(2007)$ where $f(m f(n)) = n f(m)$, $m,n\in \Bbb N$
QUESTION [9 upvotes]: If $f$ is from positive integers to positive integers and satisfies
$f(m f(n)) = n f(m)$ then find the minimum possible value of $f(2007)$.
My work so far:

$f(1) = 1$ . Proof:


Suppose $f(1) = k \neq 1$.  Then consider $f(f(2)) = 2f(1) = 2k$.
  $f(2) = f(2f(1)) = f(2k),$ $f(f(2)) = 2k,$ but the above also implies
  that $f(f(2)) = f(f(2k)) = 2k^2$, a contradiction. Thus $f(1) = 1$


I further found that if $f(a) = b$, then $f(a^x b^y) = a^y b^x$.

REPLY [4 votes]: You've already shown that $f(1)=1$. Plugging in $m=1$ it then follows that $f(f(n))=n$ for all $n$. In particular $f$ is bijective. Now for arbitrary $m$ and $n$, setting $k:=f(n)$ we see that $f(k)=f(f(n))$ and so
$$\forall m,n:\ f(mf(n))=nf(m)\qquad\Leftrightarrow\qquad \forall k,m:\ f(km)=f(k)f(m),$$
which shows that $f$ is completely multiplicative. In particular this means that $f(2007)=f(3^2)f(223)$ because $2007=3^2\times223$.
Now let $p$ be any prime number, and suppose $f(p)=ab$ for positive integers $a$ and $b$. Then
$$p=f(f(p))=f(ab)=f(a)f(b),$$
so without loss of generality $f(a)=1$. Then $a=f(f(a))=f(1)=1$ and so $f(p)$ is also prime. This means that $f$ permutes the set of primes. Because $f(f(p))=p$ for all primes this means $f$ is determined entirely by a permutation of order $2$ of the set of prime numbers.
I leave it to you to verify that conversely, every permutation of order $2$ of the set of prime numbers determines a completely multiplicative function that satisfies the functional equation. From there it is easy to verify that the minimum value of $f(2007)$ is $2\times3^2=18$.