TITLE: Prime numbers the rank of which is also a prime.
QUESTION [36 upvotes]: $127$ has an interesting property:
It is the $31$st prime number and its rank ($31$) is also a prime.
$31$ is the $11$th prime so its rank is also a prime.
$11$ is also a prime number with a rank ($5$) that is also a prime.
$5$ is the 3rd prime number and and so its rank ($3$) is also a prime.
And finally $3$ is the $2$nd prime so its rank is also a prime...
Is there a name for primes whose rank (index in the prime series) is also a prime?
That is:

If $a_i$ is the $i$th prime number, then $i$ is a also a prime.

How about numbers like $127$ where going down ranks of ranks always produce prime numbers (down to rank $2$ of course)?
The first $11$ :-) primes in this (infinite) series would be:
$3, 5, 11, 31, 127, 709, 5381, 52711, 648391, 9737333, 174440041, \dotsc$
Many thanks!

REPLY [8 votes]: Sloane's OEIS simply calls them "prime-indexed primes."
Some more common notation would be $p_i$ for the $i$th prime. Then we have the prime counting function $\pi(p_i) = i$ (this function is defined for all positive numbers).
Using these notations, we can write the sequence $$1, p_1, p_{p_1}, p_{p_{p_1}}, p_{p_{p_{p_1}}}, \ldots$$
This is Wilson's primeth recurrence.
Although both the sequence of prime-indexed primes and Wilson's primeth recurrence are infinite sequences, the former can be said to be less "exclusive" than the latter. If we iterate the function $f(n) = p_{\pi(n)}$, we'll find that all prime-indexed primes eventually reach a nonprime, but only those in Wilson's primeth recurrence reach $1$ without any composite numbers along the way.