Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

For any primorial $p_k \ge 3$, $p_k\#$, there are $$\prod_{2\le{i}\le{k}} (p_i-2)$$ distinct instances of $x,x+2$ that are relatively prime to $p_k\#$.

If any of these pairs are less than $p_{k+1}^2$, then they are necessarily twin primes.

For the heck of it, I wrote a tiny app that checks all the primes up to 191,137 and in each case there was at least one twin prime between $p_k^2$ and $p_{k+1}^2$.

Can it be proven that this eventually fails? Are there two consecutive primes $p_m, p_{m+1}$ such that if $p_i$ is a prime and $p_m^2 < p_i < p_{m+1}^2$, then $p_i,p_{i+1}$ are not a twin primes.

share|cite|improve this question
The question in your title and the last sentence of the description aren't equivalent. – Dennis Meng Oct 5 '13 at 18:27
@Dennis, could you explain. Here's my view why they are equivalent. There is not always a twin prime between $p_k^2$ and $p_{k+1}^2$ iff there exists two consecutive primes $p_m,p_{m+1}$ such that any prime $p_i$ that is in between $p_m^2$ and $p_{m+1}^2$ is not a twin prime. – Larry Freeman Oct 5 '13 at 18:31
Ah, just reread it. For some reason, I thought the second statement was only looking for one prime that isn't the smaller of a set of twin primes. Ignore me. – Dennis Meng Oct 5 '13 at 18:33
up vote 2 down vote accepted

You're looking for a small interval, so suppose you have twin primes ($p_k+2=p_{k+1}$). Then the gap is roughly $4\sqrt{x}$ with numbers around $x$. Heuristics suggest that, on average, such an interval would contain about $$ \frac{8C_2\sqrt{x}}{\log^2 x} $$ twin primes, where $C_2\approx0.6601618158$ is the twin prime constant. If we treat the primes as being Poisson distributed, the chance that no primes would be found in the interval is $$ \exp\left(-\frac{8C_2\sqrt{x}}{\log^2 x}\right) $$

For example, if $x=191137^2$ (using your number) then the chance is about 1 in $10^{741}$. The probabilities drop off rapidly from there, so probably you can find a pair of twin primes in any such interval.

share|cite|improve this answer
Hello Charles, I want to learn such heuristic methods. Where can I learn probabilistic estimation techniques for number theory? Can you suggest a book for a beginner (or video lectures)? Thank you. – Isomorphism Oct 24 '13 at 17:12
I don't know of any videos. You could try Hardy & Wright's textbook, but you may need a gentler introduction first depending on your level of knowledge. – Charles Oct 24 '13 at 17:18
@Isomorphism: Basically, you just assume that a random integer n is a prime with probability 1 / ln n. If p is a prime, then the probability that p+2 is prime is slightly different, because you know that p+2 is odd (unless p=2), but a bit more likely to be divisible by 3, 5, 7, 11 etc. than a random number. And then you start calculating based on that. – gnasher729 Feb 22 at 0:12

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.