Can a RAM calculate its own Gödel number?
Consider the computable function $Q\colon \mathbb{N}\times\mathbb{N}\to\mathbb{N}$ given by $Q(x,y) = x$.  By Kleene's second recursion theorem, there is some&nbsp;$p$ such that the program with G&ouml;del number&nbsp;$p$ computes the function $f(y) = Q(p,y)=p$, i.e., a program which outputs&nbsp;$p$ for every input. This is exactly the program you're looking for: for any input, it outputs its own G&ouml;del number.

Such a program is known as a quine, and they exist in any Turing-powerful model of computation.