Let $\langle\phi_{e} \mid e \in \omega\rangle $ be some standard enumeration of partial recursive functions. Show that there is some index $e \in \omega$, such that $f=\phi_{e}$ is a total function and $f^{n}=\phi_{f(n)}$ (where $f^{n}$ denotes composing $f$ with itself $n$-times).
I guess that trying to copy the proof of the recursion theorem the result should follow. Any hint will be appreciated!
There are probably less silly ways to do this, but:
By the recursion theorem, we can find some $e$ such that $\varphi_e$ is the constant function "$x\mapsto e$." (This is often presented as the first application of the theorem. If you haven't seen this before, do you see how to show this?)
Now take $f=\varphi_e$. We have $f^n=f$ and $\varphi_{f(n)}\cong\varphi_e\cong f$ for all $n$.
Actually, strictly speaking the above doesn't work when we take $n=0$: $f^0$ should be defined as the identity, regardless of what $f$ is. To remedy this, we ask instead for an index $e$ such that
$\varphi_e(0)$ is an index for the identity function, and
$\varphi_e(n+1)=e$.
Take $f=\varphi_e$; we now get $f^0=id=\varphi_{f(0)}$, $f^{n+1}: x\mapsto e$, and $\varphi_{f(n+1)}: x\mapsto e$ as desired.