# Defined intervals conjectured to contain at least one pair of twin primes

Apologies up front for a lengthy post. The questions posed are simple, but the thoughts underpinning them require careful exposition.

Definitions: The twin prime pair $$(3,5)$$, not being of the form $$6m\pm 1$$, is excluded from consideration in all that follows. With regard to prime numbers of the form $$6m \pm 1$$, I refer to $$m$$ as the core of such a prime. For $$a \in \mathbb N$$, $$p_a$$ is the smallest prime number having a value $$6a \pm 1$$. Any $$a$$ may give rise to zero, one, or two corresponding primes; for example, there is no $$p_{20}$$. $$q_a$$ is the smallest prime number larger than $$p_a$$ that has a different core than $$p_a$$; i.e. $$q_a=6b \pm 1$$ where $$\not \exists c | a. By way of example, $$p_1=5,\ q_1=11;\ p_5=29,\ q_5=37;\ p_{19}=113,\ q_{19}=127$$. Note that $$q_a=p_b$$. $$T$$ is the set of cores of twin primes: $$T=\{m | 6m-1 \in \mathbb P \wedge 6m+1\in \mathbb P\}$$. Initial members of $$T$$ are listed in OEIS A002822. Natural numbers are understood as not including $$0$$.

The conjecture: Every interval $$[p_a^2,q_a^2]$$ contains at least one pair of twin primes. If this conjecture is true or only fails in a finite number of instances, that would be sufficient to prove the twin prime conjecture.

My questions: The intervals as defined have properties laid out below. Do those properties enable any avenue of attack that might allow for a proof of the conjecture? I do not see a way forward from this point, but more astute mathematicians than myself might see something beyond my ken. Secondarily, would someone with access to sufficient computing power and programming skills (alas, that is not I) be willing to check the conjecture by searching for counterexamples up to some reasonably large number?

Two formulas characterizing $$m \in T$$: One formula is $$\forall 1\le j see proof in my answer to this question. A second formula is $$m\in T \iff m \ne 6jk\pm j \pm k,\ j,k>0$$ see comment by Jon Perry in OEIS A002822. Since $$m \ne 6jk\pm j \pm k \Rightarrow m\ne (6j \pm 1)k \pm j$$, this second formula is essentially equivalent to the first. Since the second formula is symmetric in $$j$$ and $$k$$, we may assume WLOG $$k\ge j$$, hence when considering some specific $$j$$, we may proceed on the basis $$6jk\pm j \pm k \ge 6j^2-2j$$. The implication of this fact is that in identifying numbers of the form $$(6j \pm 1)k \pm j$$ to be excluded from $$T$$, with regard to a particular $$j_0$$ we need only examine numbers $$\ge 6j_0^2-2j_0$$. Numbers less than $$6j_0^2-2j_0$$ that are not members of $$T$$ will be identified by evaluation with integers $$j.

Sieving for $$m$$: We sieve the natural numbers based on $$m\not\equiv \pm j \bmod {(6j\pm 1)}$$. I state without proof (in the interests of brevity) the fact that such a sieve need only be performed using prime numbers, because for any composite number $$6j-1 \lor 6j+1$$, its sieving function is fully accomplished by sieving with its prime factors.

Initiating the sieving process at $$j=1$$, we discard natural numbers $$\equiv \pm 1 \bmod (6\cdot 1 \pm 1)$$, more specifically, $$\equiv \pm 1 \bmod 5$$ and $$\equiv \pm 1 \bmod 7$$, starting with numbers $$\ge 6(1)^2-2(1)=4$$. Next we discard numbers $$\equiv \pm 2 \bmod 11$$ and $$\equiv \pm 2 \bmod 13$$, starting with $$6(2)^2-2(2)=20$$. Sieving based on $$j=1$$ thoroughly screens the natural numbers less than $$20$$: $$11\pm 2 \wedge 13\pm 2 = (9,11,13,15)$$ which are previously identified for discard as $$2\cdot 5 \pm 1 \wedge 2\cdot 7 \pm 1$$. Continue sieving in this manner with increasing $$j$$.

For each $$j=a$$, where $$a$$ is the core of $$p_a$$, previous steps have already screened all numbers less than $$6a^2-2a$$. After sieving with $$j=a$$, continuing to sieve with larger numbers (corresponding to $$j>a$$) will not remove any numbers smaller than $$6b^2-2b$$, where $$b$$ is the core of $$q_a$$.

The primary hypothesis I make is that $$\forall a,\ \exists m \in T | 6a^2-2a \le m \le 6b^2-2b$$. Since it is easier to work with primes than with their core numbers, and the twin primes corresponding to a particular core $$m$$ are of the magnitude $$6m$$, the hypothesis as may be restated as: there will be a pair of twin primes between $$6(6a^2-2a)$$ and $$6(6b^2-2b)$$. Notice $$6(6a^2-2a)=6a(6a-2) \approx p_a^2$$. Similarly, $$6(6b^2-2b)=6b(6b-2) \approx q_a^2$$. This yields the conjecture: Every interval $$[p_a^2,q_a^2]$$ contains at least one pair of twin primes.

Why these intervals? If, as widely believed, the twin prime conjecture is true, then it should be possible to divide the natural numbers into intervals such that each interval (perhaps with a finite number of exceptions) will contain at least one twin prime. Even so, arbitrarily defined intervals are unlikely to illuminate a path toward a proof of the twin prime conjecture. The intervals here are not arbitrarily chosen; they have features that might be useful in seeking a proof.

1. Collectively, the intervals contain all the natural numbers $$>3$$, so there are no unexamined gaps between intervals which might feature relevant things. Also, the bounds of the gaps, being squares, are neither primes nor $$1$$ greater than a prime, so the bounds can be neither a member of a pair of twin primes nor a number $$6m$$ medial within a pair of twin primes. Hence any pair of twin primes must be contained entirely within one interval.

2. The conjecture is valid for small numbers. All intervals up to that corresponding to $$p_{19}$$ contain multiple twin primes. The number of twin primes per interval appears to trend upward (slowly, not uniformly, but overall), suggesting that exceptions will not readily be found for small values of $$p_a$$.

3. Each interval contains many prime numbers, and the number of primes per interval also trends upward (again, not uniformly, but overall). Although the exact number of prime numbers contained in any particular interval exhibits considerable variability from interval to interval, on average intervals defined as $$[p_a^2,q_a^2]$$ are expected to contain on the order of $$p_n$$ primes (see addendum in the answer by Gary to this question for a proof, keeping in mind that in the context of the present question, $$q_a$$ will always be the next or second next larger prime than $$p_a$$). This satisfies a reasonable prerequisite to finding one or more twin primes in most if not all such intervals.

4. In light of the way in which the intervals are constructed, the question of whether each interval $$[p_a^2,q_a^2]$$ contains one or more twin primes can be assessed without reference to the contribution or influence of any primes larger than $$p_a$$, which might make a proof of this conjecture more tractable than formulations of intervals which lack this feature.

Added by edit: I have extended my calculations up to $$p_{203}=1207$$ without finding a counterexample. In general, the number of twin primes per interval $$[q_a^2-p_a^2]$$ increases, frequently exceeding $$150$$ twin primes per interval in that range. It is always the case that $$q_a-p_a\ge 4$$. The conjecture is most likely to fail in the smallest intervals, where $$q_a-p_a=4$$. Tabulation of results in those shortest intervals shows a trend toward increasing numbers of twin primes ($$\pi_2(q_a^2-p_a^2)$$) in those intervals.

$$\begin{array}{c,c,c}\\ a& p_a& \pi_2(q_a^2-p_a^2)\\ 6& 37& 7\\ 11& 67& 11\\ 13& 79& 14\\ 16& 97& 15\\ 21& 127& 12\\ 27& 163& 21\\ 37& 223& 23\\ 46& 277& 20\\ 51& 307& 22\\ 63& 379& 26\\ 66& 397& 29\\ 73& 439& 23\\ 76& 457& 33\\ 81& 487& 24\\ 83& 499& 28\\ 102& 613& 33\\ 112& 673& 42\\ 123& 739& 42\\ 126& 757& 48\\ 128& 769& 50\\ 142& 853& 43\\ 146& 877& 57\\ 151& 907& 59\\ 156& 937& 53\\ 161& 967& 48\\ 168& 1009& 54\\ 181& 1087& 68\\ 202& 1213& 68\\ \end{array}$$