Solve $f(f(n))=n!$ What am I doing wrong here: ( n!=factorial  )
Find $f(n)$ such that $f(f(n))=n!$
$$f(f(f(n)))=f(n)!=f(n!).$$
So $f(n)=n!$ is a solution, but it does not satisfy the original equation except for $n=1$, why?
How to solve $f(f(n))=n!$?

The hypothesis is $f(f(n))=n!$. This implies that $f(n)!=f(n!)$ like you say, but unfortunately the converse is not true; you can't reverse the direction and say that a function satisfying the latter equation also satisfies $f(f(n))=n!$. For a similar situation, suppose we have $x=1$ and square it to obtain $x^2=1$; now $x=-1$ is a solution to the latter equation but clearly $-1\ne+1$ so we've "lost information" by squaring.
