TITLE: Find all function $f(n)$ satisfying $f(n)^2 = n f(f(n))$
QUESTION [14 upvotes]: Find all functions $f:\mathbb N^*\to \mathbb N^*$ satisfying $f$ is a strictly increasing function and  $f(n)^2 = n f(f(n))$
Suppose we have $f(a) = f(b).$ Then
$$\begin{align}
f(a)^2 = f(b)^2 &\Rightarrow af(f(a)) = bf(f(b)) \\
&\Rightarrow a = b
\end{align}
$$
because $f(f(a)) = f(f(b)) \neq 0$.
A function $f:\mathbb N^*\to \mathbb N^*$ satisfying $f$ is a strictly increasing function$\Rightarrow f(k) \geq k$.
It is easy to see that$ f(x) = kx$ satisfies the equation. But are there any other solutions? I have no idea anymore. Hope to get help from everyone. Thanks very much.

REPLY [4 votes]: If $f(n) = k_n n$, then $(k_n n)^2 = n f(k_n n)$, so $f(k_n n) = k_n^2 n = k_n (k_n n)$. Inductively, therefore, $f(k_n^r n) = k_n^{r+1} n$. And $k_n$ has to be an integer: if it weren't, then there would be some integer $r \geq 0$ such that $k_n^r n$ was an integer but $f(k_n^r n) = k_n^{r+1} n$ wasn't.
Write $g(n) = f(n)/n$, giving $k_n$ as a function of $n$. Now let's proceed through some simple deductions.

If $g(n) = k \geq 2$ for some $n$, then $g(n) = k$ for an infinite set of values of $n$. Proof: if $k = g(n)$ then $k = g(kn) = g(k^2 n) = g(k^3 n) = \cdots$.

If $g(n) = k \geq 2$ for some $n$, then $g(n) = k$ for all sufficiently large $n$. Proof: $k$ occurs infinitely often as a value of $g$. Suppose there were arbitrarily large values of $n$ such that $g(n) \geq k+1$ but $g(n+1) \leq k$. Then $f(n) \geq kn + n$ and $f(n+1) \leq kn + k$, contradicting monotonicity of $f$ if $n \geq k$. So $g$ is eventually bounded above by $k$. Similarly, if there were arbitrarily large values of $n$ such that $g(n-1) \geq k$ and $g(n) \leq k - 1$, then $f(n-1) \geq kn-k$ and $f(n) \leq kn - n$, again contradicting monotonicity if $n \geq k$. So $g$ is eventually bounded below by $k$ as well.

$g(n)$ can take at most one value other than $1$. Proof: Any value of $g(n)$ other than $1$ must eventually become the constant value of $g$, and there can only be one such value.


So either $f$ is the identity, or $f(n)$ is either $n$ or $kn$ for some fixed constant $k$ (but whether $f(n) = n$ or $f(n) = kn$ can depend on $n$). In the latter case, monotonicity is broken if $f(n) = kn$ and $f(n+1) = n + 1$, giving the result in Max's answer that $f(n) = n$ for all integers $n < N$ and $f(n) = kn$ for $n \geq N$, for some choice of positive integers $k$ and $N$.