# Probability that p and q are both prime provided q-p=2r

Hello,

I would like to know whether there is a way, thanks to the prime number theorem, to give some kind of an equivalent of the probability that two positive integers $p$ and $q$ less than a given positive integer $n$ are both prime if one knows that $q-p=2r$, where $r$ is a given positive integer. Thank you in advance.

• Given that the twin primes conjecture is open, what sort of an answer do you expect? – Igor Rivin Jul 14 '12 at 10:28
• I expect a heuristics like the one saying that a positive integer around $x$ is prime with probability $1/\log x$, considering the two events "$p$ is prime" and "$q$ is prime" as being independent, except that I add the constraint $q-p=2r$. – Sylvain JULIEN Jul 14 '12 at 10:36
• mathworld.wolfram.com/k-TupleConjecture.html – Eric Naslund Jul 14 '12 at 11:07
• Thank you Eric. Can one deduce from this conjecture that the smallest $r$ such that $p+2r$ is a prime number when $p$ is a prime number less than $n$ verifies $r=O(\log^{2}n)$? In a very non rigorous way, one can expect the relation $2r\pi_{2r}(n)\asymp n$ to hold, and thus $r\asymp\dfrac{n}{\pi_{2r}(n)}$, where $\pi_{2r}(n)$ is the number of primes $p'$ less than $n$ such that $p'+2r$ is also prime. In other words, does the k-tuple conjecture make Cramer's conjecture more likely? – Sylvain JULIEN Jul 14 '12 at 12:10

A good estimate (in some sense) is $$\frac{\alpha_{2r}C_2}{\ln^2N}$$ where $$C_2 = \prod_{p\ge 3} \frac{p(p-2)}{(p-1)^2} \approx 0.66016.$$ and $$\alpha_{2r}=\prod_{p \mid 2r}\frac{p-1}{p-2}$$ is the product is over all odd primes $p$ which divide $2r.$
Notice that $\alpha_2=\alpha_4=\alpha_8=\dots=1$ and $\alpha_6=\alpha_{12}=\alpha_{18}=\alpha_{24}=\dots=2$
More careful statement: Let $\pi_{2r}(N)$ be the number of primes $p$ up to $N$ with $p+2r$ also prime and $\alpha_{2r}=\lim_{N \to \infty}\frac{\pi_{2r}(N)}{\pi_2(N)}.$ The twin prime conjecture is indeed open: there is no proof that $\lim_{N \to \infty} \pi_2(N)=\infty.$ However there is every reason to expect that
• $\pi_2(N) \sim C_2\frac{N}{(\ln{N})^2}.$
• $\alpha_{2r}=\prod_{p \mid 2r}\frac{p-1}{p-2}$ where the product is over all the odd primes which divide $r.$