# Sum of square root of primes

I was playing around with prime numbers and a question came into my mind:
Let $S(n)$ denote the sum of square roots of primes from $2$ to the $n$th prime number. Are there infinitely many numbers $n$ so that $\left\lfloor S(n) \right\rfloor$ is prime itself? (Where $\left\lfloor X \right\rfloor$ denotes the floor function.) Please tell me if you had any ideas about it. I actually could do nothing. xD

• One can denote the floor function at $x$ by $\lfloor x\rfloor$, coded as \lfloor x\rfloor. That seems to prevail today. I suspect the $[x]$ notation was formerly completely standard simply because typesetters didn't have little pieces of steel in a shape appropriate for anything like the notation usually favored now. – Michael Hardy May 17 '13 at 18:39
• I think when you say "like $n$", you meant to give an example? $n=3$ would work. – Calvin Lin May 17 '13 at 18:56
• It seems so. Experimentally I got a little less than $\frac {n}{\log(n)^2}$ primes for $n\le 10^8$ but proving it is another matter... – Raymond Manzoni May 17 '13 at 18:58
• It's A062009 , with no other comment. – ama May 17 '13 at 19:14

## 1 Answer

If this problem is solvable, it would require advanced tools from analytic number theory. As for a heuristic: $S(n)$ is asymptotically $\sum_{k=1}^n \sqrt{k\log k} \sim \frac23n^{3/2}\sqrt{\log n}$; and I don't see any reason why $\lfloor S(n)\rfloor$ is more or less likely to be even, a multiple of $3$, or more generally divisible by any fixed prime. (This independence is borne out by numerical experiments.) Thus the prediction would be that $\lfloor S(n)\rfloor$ is just as likely to be prime as a random integer of the same size, which is about $1/\log S(n) \sim 2/(3\log n)$. In other words, I would predict that the number of $n\le x$ for which $\lfloor S(n)\rfloor$ is prime should be asymptotically $\frac23x/\log x$. (Numerical experiments also make this appear more likely than a constant times $x/\log^2x$.)

• In my comment I was considering the primes $p\le n$ (and not the $n$ first primes as asked...) getting the following table for $n=10^1$ to $10^{10}$ : $2, 7, 23, 125, 723, 4865, 34444, 254132, 1951646, 15466581$. So that your $x\sim \frac n{\log n}$ explaining the discrepancy and comforting your fine statistical analysis (+1). – Raymond Manzoni May 19 '13 at 8:02