TITLE: Primes of form $x^2+x\pm k$
QUESTION [9 upvotes]: Let $\pi(n) = $ number of primes $ \leq n.$  Let $x_i <n,~~ i = 1,2,3,...$ such that $x_i^2+x_i \pm k $ is prime, in which $k \ll n$ is an odd integer.  Let $\pi_k(n)$ be the number of such primes less than or equal to $n^2+n\pm k.$ 
Observation (sum of logs is over $i$ such that $x_i^2+x_i\pm k$ is prime): 

$$(1) \hspace{5mm}\frac{\pi_k(n)}{\sum_{i}\log x_i} \approx \frac{\pi(n)}{n}$$

Example: $k= 3, n = 1000000, \pi(n) = 78498, \pi_3(n) = 40036, \sum_{i} \ln x_i \approx 509310.$
$$\frac{\pi_3}{\sum_{i}\log x_i}= 0.0786 \approx \frac{\pi(n)}{n} = 0.0785.$$ 
Can we justify (1) if only intuitively, conditioned on the existence of infinite primes of the form $x^2+x\pm k?$

REPLY [3 votes]: Heuristically this could be seen as following from the Bateman-Horn conjecture.
For a given polynomial $F(x)$ we consider the set of positive integers
$$
P(F,n) = \{ x | 1\le x \le n, F(x)~\mathrm{is~prime}\}
$$
then define
$$
\pi_F(n) = |P(F,n)|
$$
and we are interested in the quantity
$$
R(F,n) = \frac{\pi_F(n)}{\sum_{x\in P(F,n)}\log x} \\
\frac{1}{R(F,n)} = \frac{1}{|P(F,n)|}\sum_{x\in P(F,n)} \log x = E[\log x]
$$
where strictly speaking $E[\cdot]$ here is the sample average, but we can think of it as the expectation with respect to the distribution of $x$ for which $F(x)$ is prime.
The Bateman-Horn conjecture says that for a single polynomial
$$
\pi_F(n) \sim C_F\int_2^n\frac{1}{\log t} dt
$$
where $C_F$ is a constant that depends on $F$. Assuming the approximation is good for all $n$, this says that the distribution of $x$ in $P(F,n)$ is the same for any choice of $F$, specifically
$$
Pr[x<X|x\in P(F,n)] \sim \frac{C_F\int_2^X (\log t)^{-1} dt}
{C_F\int_2^n (\log t)^{-1} dt} = \frac{\int_2^X (\log t)^{-1} dt}
{\int_2^n (\log t)^{-1} dt}
$$
independent of F. So it should apply more broadly to any single prime-generating polynomial, not only to the forms you've given. Here are some examples:
$$
\begin{array}{c|c|c|c|c}
F & n & \pi_F(n) & \sum_{x\in P}\log x & R(F,n) \\
\hline \\
n & 10^6 & 78498 & 998484. & 0.078617\cdots \\
n^2+n+3 & 10^6 & 40036 & 509309. & 0.078608\cdots \\
n^2+n-7 & 10^6 & 88768 & 1129088. & 0.078619\cdots \\
n^3-n^2+2x+7 & 10^6 & 27047 & 343676. & 0.078699\cdots \\
n^6+2n^3+3n+5 & 10^6 & 31468 & 400107. & 0.078648\cdots \\
n & 10^7 & 664579 & 9995179. & 0.066489\cdots \\
n^2+n+3 & 10^7 & 339824 & 5111493. & 0.066483\cdots \\
n^3-n^2+2x+7 & 10^7 & 229549 & 3452061. & 0.066496\cdots
\end{array}
$$
(For $n^2+n-7$ I don't include $1$ in $P$.)
All that remains to put in your form is to show that $\sum_{p\le n} \log p \sim  n$. This is Chebyshev's $\vartheta(n)$, the asymptotic is correct and explicit bounds are available.