<s>[INST] Find $f(3)$ if $f(f(x))=x^{2}+2$ Let $a,b,f(x),x$ be positive integers such that If $a>b$ then $f(a)>f(b)$ and $f(f(x))=x^{2}+2$ . Find $f(3)$
My approach:
Replacing $x$ with $f(x)$ in the equation gives $f(f(f(x))) = f(x)^2 + 2$, but $f(f(x)) = x^2 + 2$ so $$f(x^2+2) = f(x)^2 + 2$$
how do i proceed after this. Please help. Thanks alot!
 [/INST] Note that $f(f(1))=3$ so there is some natural number $n$ such that $f(n)=3$.
If $f(1)>3$ then there could be no solution to $f(n)=3$ so we must have $f(1)\in \{1,2,3\}$.
If $f(1)=3$ then we have $3=f(f(1))=f(3)$, a contradiction.
If $f(1)=1$ then we would have $3=f(f(1))=f(1)$, a contradiction.
Thus $f(1)=2$.
It follows that $$f(2)=f(f(1))=1^2+2=3$$ from which we deduce that $$f(3)=f(f(2))=2^2+2=6$$ and we are done.
</s>