# Given a sufficiently large integer $N$, is it true that there are more primes than perfect squares in $[1,N]$?

We know that the sum of the reciprocals of all prime numbers diverges (that is, $\displaystyle\sum_{p\text { is prime}}p^{-1}=\infty$) and the sum of the reciprocals of all perfect squares converges (that is, $\displaystyle\sum_{k=1}^{\infty}k^{-2}<\infty$). Does this result imply that the set of prime numbers is more "dense" than the set of perfect squares; that is, given a sufficiently large integer $N$, there are always more primes than perfect squares in the closed interval $[1,N]$? If so, how about the answer to the following generalised question:

For a fixed positive number $\varepsilon$, does there exist a positive integer $N_{\varepsilon}$ such that if $N>N_{\varepsilon}$, there are always more primes than numbers of the form $k^{1+\varepsilon}$ (where $k$ is a positive number) in the closed interval $[1,N]$?

My guess is that the answer appears to be yes, since $\displaystyle\sum_{p\text { is prime}}p^{-1}=\infty$ whilst $\displaystyle\sum_{k=1}^{\infty}k^{-1-\varepsilon}<\infty$.

• Ever heard of the Prime number theorem? Yes, your guess is true. – Ivan Neretin Mar 1 '18 at 12:05
• Thanks @IvanNeretin! I was not aware of it. – Zuriel Mar 1 '18 at 15:12

According to the prime number theorem, the number primes less than $N$ grows approximately at the rate $N/\ln N$ where as the number of numbers of the form $k^{1+\epsilon}$ which are less than $N$ grow at the rate $N^{1/(1+\epsilon)}$. Thus clearly number of primes grow faster because beyond a certain point, for every $\epsilon$, $\ln N$ will eventually grow slower than $N^{\epsilon/(1+\epsilon)}$.
• Thank you for your answer! Can this result be proven using the fact that the sum of reciprocals of all primes diverges but the sum of $1/k^{1+\varepsilon}$ converges? – Zuriel Mar 2 '18 at 3:08
You can also use Bertrand's postulate, which says there is always at least one prime between $n$ and $2n - 2$ for $n > 3$.
Between $1$ and $n^2$ there are obviously $n$ squares (without loss of generality, we stipulate that $n$ is positive). Thanks to Bertrand, we can deduce that there is at least one prime between each multiple of $n$ and the next, from $n$ up to $n^2$. And if $n > 3$, then there are at least two primes between $1$ and $n$, which tells us there are at least $n + 1$ primes between $1$ and $n^2$.
• Thanks! But Bertrand's postulate will not work for the generalised question (the one compare number of primes and number of numbers of the form $k^{-1-\varepsilon}$), right? – Zuriel Mar 3 '18 at 1:02