On the existence of an injective recursive function such that all its values are also its indexes. Kleene's second recursion theorem easily yields a self-referential program. What is more, it gives a program $P_a$ that computes any computable function of its index $a$ and its input. But does an injective recursive function exist, such that all its values are also its indexes. In other words does an injective recursive function $g$ exist, such that for each value $g(n)$ the program $P_{g(n)}$ computes the said function $g$?
EDIT: To make it absolutely clear let $\varphi_a$ denote the one argument function calculated by the program $P_a$ with index $a$. I am looking for an injective function $g$ such that for all natural numbers $n$, $\varphi_{g(n)}(x)=g(x)$
 A: It is easy for $g$ to exist if you don't require that $g$ hits all indices for a program that computes $g$. In that case we can say, essentially
$$\begin{align}g(n) = &\text{let } x
= \text{the source for this program (by any standard quine construction)}\\
   &\text{in the index of the program that consists of }n\text{ "skip"s followed by }x
\end{align}$$
Variants of this construction can be produced under even very abstract conditions on how we're enumerating computable functions (basically the $s$-$n$-$m$ theorem has to hold, and composition of functions has to be computable, and perhaps one or two similar conditions which I may have forgotten).

However, $g$ cannot exist if we require it to output all of its indices. If it did, we could use it to decide the halting problem. Suppose we want to know whether Turing machine $T$ halts. Now consider the program
$$ P_q(n) = \begin{cases} 0 &\text{if }T\text{ halts in at most }n\text{ steps} \\
g(n) &\text{otherwise}\end{cases}$$
Then $P_q$ program computes $g$ exactly if $T$ doesn't halt. So we can find out whether $T$ halts by enumerating all of the outputs of $P_q$ and look for either $0$ or $q$ itself.
