It is well-known that using the sieve of Eratosthenes, we can generate the sequence of primes $2,3,5,7,11,13,17,19,\ldots\), which is known to be infinite. It is a longstanding problem to prove if there are (or there are not) infinitely many twin primes \((3,5),~(5,7),~(11,13),~(17,19),~(29,31),\ldots\).
There exists an efficient method[^6913] to sieve all twin primes of the form \((6k-1,6k+1)\), \(k=1,2,\ldots\).
Note that these are all twin primes except the twin primes \((3,5)\). This is because even almost all primes (and not only twin primes) can be written in this form1.
The following figure visualizes this sieve method:
With this respect, the sequence \(k=1, 2, 3, 5, 7, 10, 12, 17, 18, 23, 25, 30, 32, 33,\ldots\) can be called the twin prime sequence.
The following lemma formalizes this result.
Let $n\ge 1$ be an integer. The integer $a_n:=36n^2-1$ is the product of two
twin primes $p=6n-1$ and $q=6n+1$ if and only if $n\not\equiv\pm f_s\mod s$ for
all primes $s$ with $5\le s\le\sqrt q,$ where, using the floor function,
the residue classes $f_s$ are defined by $$f_s:=\left\lfloor\frac {s+1}6\right\rfloor.$$
Proofs: 1
This is because for all remaining natural numbers \(n\), there is a \(k\ge 1\) such that \(n=6k-2\), or \(n=6k+2\), or \(n=6k-3\), or \(n=6k+3\), and all these numbers are divisible by \(2\) and \(3\). Since they are composite (i.e. not prime), all the remaining primes (and twin primes) must be of the form \(n=6k-1\) or \(n=6k+1\). ↩