For $n \geq 3$ let $r(n)$ be the previous prime to $n$; i.e., the largest prime strictly less than $n$. For example, $r(3) = 2$, $r(10) = 7$, and so on.
I have noticed that $r(n^p)$ is very close to $n^p$. In fact, I suspect that $$\lim_{n\to\infty}\frac{r(n^p)}{n^p} = 1$$ for any positive integer power $p$, where the convergence is faster if $p$ is big. Is this true? Are there effective bounds on the rate of convergence? Is there a simple proof of this fact?
Here's an argument that doesn't work: By Bertrand's postulate, there exists a prime between $n^p / 2$ and $n^p$ (roughly). Therefore $$\frac{r(n^p)}{n^p} \geq \frac{1}{2}.$$ But this is pretty far from $1$.
I think that I can prove this using some fancy number theory results, but they seem like sledgehammers. I'd like something simpler.
Notice that $r(m)=p_{\pi(m-1)}$ where $p_m$ is the $m$th prime number. (Since $m=n^p$ won’t be prime in our case we will always have: $\pi(m)=\pi(m-1)$ and we can write everything more conveniently as $r(m)=p_{\pi(m)}$.)
Look at the number of primes less than $n^p$: that would be $\pi(n^p)\approx\frac{n^p}{\log(n^p)}$. Now you are looking for approximately the $\pi(n^p)$th prime number and $p_m\approx\,m\log(m)$, thus $p_{\pi(n^p)}\approx\,n^p-n^p\frac{\log(\log(n^p))}{\log(n^p)}$. Now your function is essentially $p_{\pi(n^p)}/n^p\approx{}1-\frac{\log(\log(n^p))}{\log(n^p)}$ which converges to $1$.