Asymptotics for primality of sum of three consecutive primes

I believe proving (or disproving) such a statement is beyond current technology. On the other hand, by a crude heuristics the conjecture must be right: $R_1,\dots,R_n$ are $n$ odd numbers up to $\sim 3n\ln(n)$ which are rather evenly distributed in size and in residue classes. In this range the density of primes among odd numbers is $\sim 2/\ln(n)$, so $R(n)$ should be $\sim 2n/\ln(n)$.

EDIT: As Noam Elkies points out in a comment below, there should be a fine tuning similar to the twin prime constant.


I verified Noam's calculation of the factor $\lambda=2.30096\ldots$ and Álvaro's computations, extended the latter and calculated the corresponding ratios:

$$ \begin{array}{|c|c|c|c|c|} n & R(n) & 2n/\log n & \lambda n / \log n & R(n)\log n/n\\\\ \hline 10 & 7 & 9 & 10 & 1.61181\\\\ 100 & 44 & 43 & 50 & 2.02627\\\\ 1000 & 339 & 290 & 333 & 2.34173\\\\ 10000 & 2437 & 2171 & 2498 & 2.24456\\\\ 100000 & 18892 & 17372 & 19986 & 2.17502\\\\ 1000000 & 157183 & 144765 & 166549 & 2.17156\\\\ 10000000 & 1346797 & 1240841 & 1427564 & 2.17078\\\\ 30000000 & 3784831 & 3484987 & 4009410 & 2.17208\\\\ \end{array} $$

(The values in the third and fourth columns are rounded to the nearest integer, the values in the last column are rounded to 5 digits after the decimal point.)

I don't think we can deduce anything from the ratio in this form, however, since it shows convergence in the "random" fluctuations but not with respect to the asymptotic approximations made, e.g. dropping a term $\log\log n$, which at this stage is still comparable to $\log n$; a more detailed analysis will be required to test the independence hypothesis in this case.

[Update:] With reference to Noam's comments below, here are some data for the relative frequencies of the sum of three consecutive primes being divisible by the first four odd primes. These are averaged over samples of $400,000$ primes beginning at powers of ten, which are given in the first column; note that these refer to the numbers $x$ themselves, not the indices $n$ of the primes.

$$ \begin{array}{|c|c|c|c|c|} \log_{10}x&3&5&7&11\\\\ \hline 8 &0.183&0.165&0.130&0.087\\\\ 9 &0.189&0.169&0.131&0.087\\\\ 10&0.195&0.170&0.133&0.087\\\\ 11&0.198&0.172&0.133&0.088\\\\ 12&0.203&0.173&0.133&0.088\\\\ 13&0.208&0.175&0.134&0.087\\\\ \hline \text{limit?}&0.250&0.188&0.139&0.090 \end{array} $$

I also looked at the joint distribution of the residues modulo $3$ for the three primes. There's a significant preference for avoiding repeated residues; for instance, at $x=10^9$, the repeating patterns $1,1,1$ and $2,2,2$ have relative frequencies around $0.095$, the alternating patterns $1,2,1$ and $2,1,2$ have relative frequencies around $0.150$, and the remaining mixed patterns have relative frequencies around $0.128$, which is almost completely explained by $1,1$ and $2,2$ having relative frequencies $0.445$ and $1,2$ and $2,1$ having relative frequencies $0.555$. I'm trying to work out a probabilistic model for these effects.


For what it's worth, I calculated a bunch of values of $R(n)$ and the claimed densities. I also had into consideration Noam Elkies' possible correction to the factor of $2$ (i.e., use $\lambda n/\log(n)$ instead of $2n/\log(n)$, where $\lambda = \prod_l (1+1/(l-1)^3)\cong 2.30096\ldots$; see the comments in GH's answer). $$ n \quad|\quad R(n) \quad | \quad 2n/\log(n) \quad | \quad (2.30096)n/\log(n)$$ $$ 10 \quad | \quad 7 \quad | \quad 8.685\ldots \quad | \quad 9.992\ldots$$ $$ 100 \quad | \quad 44 \quad | \quad 43.429\ldots \quad | \quad 49.964\ldots$$ $$ 1000 \quad | \quad 339 \quad | \quad 289.529\ldots \quad | \quad 333.098\ldots$$ $$ 10000 \quad | \quad 2437 \quad | \quad 2171.472\ldots\quad | \quad 2498.235\ldots$$ $$ 100000 \quad | \quad 18892 \quad | \quad 17371.779\ldots \quad | \quad 19985.884\ldots$$