# number of prime gaps of given length is directly proportional to the number of primes

Could someone shed some light on what we know about the density of twin primes?

it seems to be empirically true that the density of prime gaps increases as $\log(x)$ does for any gap. (i.e. the number of prime gaps below $\log(x)$ of length $g$, divided by $\log(x)$ itself increases with respect to $x$). http://imgur.com/QeB9F83 g is on the y axis and log(x) (where x is the first prime on gap g) is on the x axis. for primes up to 1,000,000 though I've tried for twins up to 5,000,000 and the pattern continues

An ever increasing density should mean infinite number of gaps. So it would be interesting to know where there has been work done to try and show something about these densities.

Also, The ratio describing the number of prime gaps of length $g$ divided by the total number of of prime gaps below $x$ seems to approach a straight line for every $g$. (It appears to be the same with $2$ and $4$, which I think is implied by one of the Hardy-littlewood conjectures but I'm not quite sure whether the conjecture talks about constant ratios). number of twins on x axis and number of gaps on y.

Ratio for cousin primes http://imgur.com/zFw0qkp. Sexy primes, note that whereas 2 and 4 are virtually the same, this line is slightly less inclined. http://imgur.com/1fQCVXs. http://imgur.com/5101Pct gap length fifty. http://imgur.com/m354YAI fifty-four, it gets increasingly jagged but up to 5,000,000 the imperfections fade, so I'm assuming it's an "a ~ b" sort of thing.

If the ratio at any point add up to one, wouldn't knowing the ratios be a useful tool?

• Such graphs certainly can't be a line forever - they need to flatten out, since for any $k$, the primes which are exactly $k$ apart have an asymptotic density of $0$ in the primes. – Milo Brandt Aug 26 '15 at 15:17
• You have asked this already, but deleted that question immediately before posting it identially as this question. This behavior is generally considered abuse of the site. Boo, -1! – Henning Makholm Aug 26 '15 at 15:20

## 1 Answer

Because the twin primes have not (yet!) been proven to be infinite, it's hard to give the ratio between twin primes and all primes. But Brun's theorem gives an upper bound which is conjectured to be within a constant factor of the true ratio.

In particular, there are O(x/log^2 x) twin primes up to x, and Theta(x/log x) primes, so the ratio up to x is O(1/log x), which goes to 0 as x increases without bound.

• yes but the ratio seen on the graph doesn't seem to be changing on order $\frac{1}{log(x)}$ – Dis-integrating Aug 27 '15 at 19:25
• @gebra: The graph is reversed, with total primes on y and twins on x. As you double the value on the x axis from x to 2x you expect the value on the y axis to increase from y to about (2 + log 4/log x)*y. – Charles Aug 27 '15 at 20:49
• It seems to me to produce a somewhat linear correlation? – Dis-integrating Aug 28 '15 at 15:54
• @gebra: It should look more and more like a line the further you zoom out, since the log 4/log x term approaches 0 from above. – Charles Aug 28 '15 at 16:32
• but surely the 'true' ratio can't be 1/2? It's got to be less – Dis-integrating Aug 28 '15 at 19:06