Does it exist a given explicit function $f:\mathbb N\to\mathbb R$ such that forall N big enough $\exists m,n\in\mathbb N: m,n>N \wedge f(m)\leq p_m\wedge f(n)\geq p_n$?
A literal answer to your question: $f(x)=p_{\lfloor x\rfloor}$ works. But I think you want something stronger than merely being "explicit", more like a finite-length formula over well-known functions.
Littlewood proved in 1914 that for all $N$ there are $n,m>N$ such that $$ \operatorname{li}(m)\le\pi(m)\ \vee\ \operatorname{li}(n)\ge\pi(n). $$ The usual citation is [1] though I have not read the paper (it is in French). It is likely that for all $N$ there are $n,m>N$ such that $$ ¿\qquad\operatorname{li}^{-1}(p_m)\le m\ \vee\ \operatorname{li}^{-1}(p_n)\ge p\qquad? $$ but I cannot immediately prove this.
[1] J. E. Littlewood, Sur la distribution des nombres premiers, Comptes Rendus 158 (1914), pp. 1869-1872.
-
$\begingroup$ It may be that I don't understand your notation well. I think Littlewood's paper proves something stronger--the inequalities are strict and the theorem guarantees a difference that depends explicitly on x (your m,n). Sidestepping the French, the claim is Littlewood's eq. (3). I realize this is not the main point of your answer... $\endgroup$ – daniel Aug 19 '16 at 7:55