# Potential infinite, fast growing subsequence of twin primes

Probably the most interesting part of this discussion is about twin primes of the form $$6x\pm 1$$, with $$x=4\cdot(5\cdot 7\cdot 11\cdot 13\cdot 17 \cdot 19\cdot 23)$$ being a typical example, and the conjecture that there are infinitely many of them. The reader can jump to section 2 first, where this is discussed: that's where the interesting material (and my question) can be found. Section 1 is there only to provide background, a much more general conjecture, and my motivation to study this problem. The first sentence in section 2 provides the link between section 1 and 2.

1. General case

Let $$s_n=\{s_3,s_4,s_5,\dots\}$$ be a set of sets, with $$s_k$$ defined as follows: $$x\in s_k$$ if and only if

• $$x$$ is a strictly positive integer, with $$\bmod(x, p)=r_p$$, for all primes $$p$$ with $$5\leq p\leq p_k$$ (here $$p_k$$ is the $$k$$-th prime, with $$p_1=2$$ and $$p_3=5$$)
• $$(r_p)$$ is a pre-specified, infinite sequence of positive integers, indexed by the prime numbers, satisfying $$0\leq r_p < p$$, with $$r_p\neq \lfloor p/6 + 1/2 \rfloor$$ and $$r_p\neq p-\lfloor p/6 + 1/2 \rfloor$$

If we had the condition $$\bmod(x, p)=r_p$$, for all primes $$p$$ with $$5\leq p\leq 6\sqrt{x}$$, then $$6x-1$$ and $$6x+1$$ would be twin primes (see here). But this condition is not required here. In short, because we only require the condition to be true for $$5\leq p \leq p_k$$, the numbers $$6x-1$$ and $$6x+1$$ are twin prime candidates (because they start with the right residues up to $$p_k$$) but there is no guarantee that they are twin primes. They are just much more likely to be twin primes than if you pick up random numbers with a gap of $$2$$, of the same order of magnitude. Yet the chance that they are twin primes still remains slim.

By virtue of the Chinese Remainder Theorem, if $$k\geq 3$$, we know that $$s_k$$ contains infinitely many elements. In particular, if $$x_k$$ denotes the smallest element of $$s_k$$, then all elements of $$s_k$$ are of the form $$x_k + m\pi_k$$, where $$m$$ is any positive integer, and $$\pi_k=p_3\times p_4 \times p_5\times\dots\times p_k$$.

Let $$s^*_k$$ be the subset of $$s_k$$ consisting of numbers $$x$$ such that $$6x-1$$ and $$6x+1$$ are actually twin primes. The proposed conjecture is as follows: regardless of $$k\geq 3$$, the set $$s^*_k$$ contains infinitely many elements. Note that even if $$s^*_k$$ contained only zero or one element, as long as it contains at least one element for infinitely many values of $$k$$, it would still imply the twin prime conjecture. The smallest element of $$s^*_k$$ (if it exists) is denoted as $$x^*_k$$ and has the form $$x^*_k=x_k + m_k\pi_k$$ for some positive integer $$m_k$$. On average, the larger $$k$$, the larger $$m_k$$, though the growth rate seems slow. I am particularly interested in the sequence $$(m_k)$$.

2. Special case

Let $$k$$ be fixed. The case $$r_p=0$$, for all primes $$5\leq p\leq p_k$$, is of particular interest. It leads to $$x_k=\pi_k$$, resulting in the following conjecture:

Regardless of $$k\geq 3$$, there is at least one positive integer $$m$$ (and probably infinitely many) such that if $$x=(1+m)\pi_k$$, then $$6x-1$$ and $$6x+1$$ are twin primes. Here, $$\pi_k=p_3\times p_4 \times p_5\times\dots\times p_k$$. The $$p_i$$'s are the prime numbers with $$p_1=2$$. The smallest possible value of $$m$$, for a given $$k$$, is denoted as $$m_k$$. If true, this conjecture would imply that the twin prime conjecture is true.

My question is to compute $$m_k$$ for the first few $$k$$'s, beyond the values that I have already computed, and listed in the table below. In short, my question is about adding more columns to the table below, which is always possible for any $$k$$ if my conjecture in true. It would be nice if we always have $$m_k, but that is just a wish.

$$\begin{array}{|c|cccccccccc|} \hline k & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 & 11 & 12\\ \hline m_k& 0 & 1 & 0 & 5 & 7 & 10 & 3 & 15 & 21 & 3 \\ p_k& 5 & 7 & 11 & 13 & 17 & 19 & 23 & 29 & 31 & 37 \\ \hline \end{array}$$

Examples of twin primes generated by my method:

• $$k=3$$ results in $$\pi_k=5,m_k=0$$, and the following twin primes: $$29$$ and $$31$$
• $$k=4$$ results in $$\pi_k=35, m_k=1$$, and the following twin primes: $$419$$ and $$421$$
• $$k=12$$ results in $$\pi_k=1236789689135,m_k=3$$, and the following twin primes: $$29682952539239$$ and $$29682952539241$$

Of course my method quickly produces very large twin primes as we are dealing (by design) with sequences having a much higher density of twin primes than expected by chance. But that is not the goal; to generate very large twin primes, the Twin Prime Search methodology (see here) is probably more efficient, though my methodology could be blended with the Twin Prime Search to further enhance it. My goal, in the end, is to further study the residues (modulo $$p$$) involved beyond $$p=p_k$$ (for a fixed, arbitrary $$k$$), hoping to find some patterns, and then take it from there. Of course, for $$5\leq p\leq p_k$$, these residues are all zero.

Finally, a very similar approach could be used to handle cousin primes and even primes, see here.

• Section 2 seems to require parts of section 1 to even begin reading it. Not sure what the point is of suggesting we can skip section 1. Sep 16 '21 at 23:46
• @Thomas: I have tried to write section 2 in such a way that it could be read independently from section 1, except for the very first sentence. Obviously, I failed at that and may have to re-write the introduction. My guess is that readers are probably more interested in section 2 than section 1 as section 2 appeals to a larger audience, but I could be wrong. Sep 16 '21 at 23:50
• Perhaps it would be good to put a sentence or two at the beginning describing what will be explained later on. Are you claiming to have proven that there are infinitely many twin primes? Something else?
– lulu
Sep 16 '21 at 23:50
• @lulu: I will work on that when I am back at my desk. Of course I did not prove that there are infinitely many twin primes. My methodology is purely empirical so it proves nothing, and I thought I was clear about it. Section 1 is a bit more theoretical and based on some proven facts, yet elementary, but leading only to conjectures. But the idea is to eventually discover patterns, some of which might result in progress understanding the mechanics behind twin primes. Sep 17 '21 at 0:01
• But if we get to larger number, lets say with $10\ 000$ or more digits, the chance for primality is even small if we rule out factors upto $10^{10}$ (It increases only by factor $41$). The primes in the largest known twin pair are much smaller than the largest known prime (about $388\ 000$ digits compared to more than $24.8$ million digits). The reason is simple : Both numbers have to be prime which roughly squares the chance of a success compared to a single prime of the same magnitude. Sep 17 '21 at 11:10

The question concerns twin primes of the form $$6x\pm 1$$ for special values of $$x$$. As proved in my answer to this question, $$x$$ will yield twin primes iff $$x\not\equiv \pm a_i \bmod p_i$$ for all $$a_i where $$a_i$$ is the integer closest to $$\frac{p_i}{6}$$ for all $$p_i\ge5$$. See a listing in of $$a_i$$ in OEIS A024699
$$x$$ is special in that it is a multiple of $$\frac{p_k\#}{6}$$. This affords $$x$$ an excellent head start in qualifying as a generator of twin primes, because for any multiple of $$x$$, which I will call $$Mx$$, it is assured that $$Mx\equiv 0\not \equiv \pm a_i \bmod p_i$$ for all $$3\le i \le k$$
The problem remaining is just this: for $$p_{k+1},p_{k+2},\dots,p_n$$ where $$p_n, $$Mx$$ will have a non-zero residue $$\bmod p_j$$, where $$k+1\le j \le n$$; call that residue $$r_j$$. It is necessary to choose $$M$$ such that $$r_j\not\equiv \pm a_j \bmod p_j$$
The conjecture advanced by OP is in substance that this will always be possible. It is not clear to me that proving such a claim requires anything less rigorous or demanding than proving the broader claim that it is generally possible to pick a number $$y$$, not necessarily of the form of $$x$$, such that $$y\not\equiv \pm a_i \bmod p_j$$ for all $$a_i.
• The condition $y \not\equiv \pm a_j \bmod p_j$ must be verified up to (but not beyond) the largest prime $p\leq 6\cdot \sqrt{y}$, for $y$ to produce the twin primes $6y\pm 1$. If you go beyond $6\cdot \sqrt{y}$ you may miss some twin primes. If you go up to the largest prime $p\leq 6y$, you end up with nothing. Sep 17 '21 at 18:53