In a previously posted question (A sieve for twin primes; does it imply there are infinite many twin primes?), I demonstrated that a sieve can be constructed that identifies all twin primes, and only twin primes. It relies on the fact that all twin primes (other than the unique example ($3,5$)) have the form $(6n-1, 6n+1)$.

The sieve works as follows: First we list all pairs of numbers having the form $(6n-1, 6n+1)$ for $n \ge 1$. All possible prime twins will be included in the list, as well as many pairs that are not prime twins (some containing no primes at all, such as for $n=20$). Next we generate numbers of the form $m=(6k \pm 1)$, which will include all primes (other than $2$ and $3$, which are not relevant here), and then we generate a multiplier such that all appropriate multiples of the first set of numbers ($m$) will be generated. The appropriate multiplier is of the form $(6j \pm 1)$, because potential multipliers having other forms $(6k, 6k \pm 2, 6k+3)$ will not give multiples of $m$ that have the form $(6n \pm 1)$, and thus are not relevant. If a particular pair of numbers $(6n-1, 6n+1)$ for some value of $n$ contains one or more of such multiples of $m$, it is removed. Note that it does not matter is some of the values of $m$ are not primes, as removing multiples of a compound number just repeats removing multiples of the prime factors of that compound number; it doesn’t change the performance of the sieve. By this sieve, all pairs that contain compound numbers are eliminated and what remains are twin primes. To summarize, pairs of numbers are removed when $(6n \pm 1)=(6j \pm 1)m=(6j \pm 1)(6k \pm 1)$.

What the sieve shows is that $(6n-1, 6n+1)$ is not a twin prime iff $(6n \pm 1)=(6j \pm 1)(6k \pm 1)$, where $j,k,n$ are natural numbers. Expanding, $(6n \pm 1)=(6j \pm 1)(6k \pm 1)$ becomes $(6n \pm 1)=(36jk \pm 6j \pm 6k \pm 1)$. The equality can only be true if the signs attached to the $\pm 1$ on each side of the equation are the same, so we can remove those terms and divide what remains by $6$, obtaining $n=6jk \pm j \pm k$.

Theorem: For natural numbers $j,k,n$, the pair $(6n-1, 6n+1)$ is not a twin prime iff $n=(6jk \pm j \pm k)$. Stated in the affirmative, $(6n-1, 6n+1)$ is a twin prime iff $n \ne (6jk \pm j \pm k)$.

The presented steps leading up to the statement constitute the proof of the theorem. What strikes me as remarkable is that, despite there being no possible algebraic systematization of the prime numbers, the twin primes are perfectly amenable to this simple algebraic characterization.

My first question is: Have I merely rediscovered a fact that was previously known? If so, any references or citations that can be provided would be greatly appreciated. In the unlikely event that this is in fact truly novel, is it publishable?

The above theorem allows a reformulation of the twin prime conjecture, which posits that there is no limit to the size of twin primes. If that conjecture is false, and there is a largest twin prime pair, then there is a number $n_{max}$ such that for all $n>n_{max}$, $n$ can always be expressed as $(6jk \pm j \pm k)$ for some natural numbers $j,k$. If the twin prime conjecture is true, then there is no limit to the size of numbers $n$ which cannot be expressed as $(6jk \pm j \pm k)$.

My second question is: Can any theorists out there suggest how to attack the conjecture as I have reformulated it?

  • $\begingroup$ Use compound arithmetic progressions. It's a good case study and you should be able to get the weak form in a couple of months with a few hints. The strong form looks like it depends on the Riemann Hypothesis. Don't bother using sieve theory for this. $\endgroup$
    – user56983
    Commented Aug 21, 2018 at 5:44

2 Answers 2


Let $n$ be the sequence of integers such that $(6n-1,6n+1)$ are twin primes. For your first question, at the very least such an observation has been made here by "Jon Perry" here: https://oeis.org/A002822

You'll find numerous other observations within that link as well. In particular, there are plenty of red-herring reformulations of twin primes, another one being $(4(p-1)!+1)\equiv -p\pmod{p(p+2)}$ iff $(p,p+2)$ are twin primes. I say red-herring because the actual usefulness of these is dubious. In your case, showing a number is not of the form $6ij\pm i\pm j$ is considerably more difficult than it looks.

Concerning your second question, you're effectively asking us to tell you how to prove the twin primes conjecture. The closest thing I can think of is general sieve theory, for which a good introduction can be found here.

  • $\begingroup$ Thanks for the link; can't say I'm surprised that this has been found before. My second question goes to your comment at the end of the second paragraph, proving a number is not of a certain form, rather than to looking at sieve theory. $\endgroup$ Commented Aug 8, 2018 at 18:43

Positive integers which do not appear in all four arrays A1(i,j)=6i^2+(6i−1)(j−1), A2(i,j)=6i^2+(6i+1)(j−1), A3(i,j)=6i^2−2i+(6i−1)(j−1) and A4(i,j)=6i^2+2i+(6i+1)(j−1)

                |  6   11    16     21   ...|
    A1(i,j) =   | 24   35     46    57   ...|
                | 54   71     88   105   ...|
                | 96  119    142   165   ...|
                |...  ...  ...   ...     ...|

                 |  6    13   20    27   ...|
     A2(i,j) =   | 24    37   50    63   ...|
                 | 54    73   92   111   ...|
                 | 96   121  146   171   ...|
                 |...   ...  ...   ...   ...|

                       | 4       9     14       19.. |
                       |20      31     42       53...|
                       |48      65     82       99...|
              A3(i,j)= |88     111     134     157...|
                       |...   ...      ...     ...   |

                | 8      15      22     29 ..|
                |28     41       54     67...|
       A4(i,j)= |60     79       98     117..|
                |104   129      154    179...|
                |...    ...     ...     ...  | 

are index k of twin primes in the sequences S1(k)=6k−1 and S2(k)=6k+1.

So twin primes are:

5,7(k=1) .. 11,13(k=2) ..17,19(k=3) .. 29,31(k=5)....

Algorithm for finding twin primes https://www.academia.edu/37724498/FINDING_TWIN_PRIMES_IN_THE_RANGE_N1_N2_


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .