[Math] Pattern in twin primes

linear algebraprime numbersproof-writingsolution-verification

I recently noticed a pattern in twin primes. My questions are: does this pattern continue to hold indefinitely, and how would I prove it? Here's the pattern:

For the $n$th prime, there exists exactly $n-2$ twin prime pairs that can be created as follows:

$p_n$ is the $n$th prime,

$P_p=\prod_{1<m<n}p_m$

$(p_nP_p-4, p_nP_p-2)$

Here's what I've worked up to:

$n=3$ $(p_n=5)$ has $3-2=1$ twin prime pairs
$P_p=3$ gives $(15-4,15-2)=(11,13)$

$n=4$ has 2
$P_p=3$ gives $(17,19)$
$P_p=3\cdot 5$ gives $(101,103)$

$n=5$ has 3
(29,31), (227,229), (1151,1153)

$n=6$ has 4
(191,193), (269,271), (2141,2143), (2999,3001)

$n=7$ has 5
(659,661), (2801,2803), (4637,4639), (23201,23203), (255251,255253)

Again, my questions are: does this pattern continue to hold indefinitely, and how would I prove it?

P.S. How about a pic of a brute force Mathematica script up to like 20?

Best Answer

This is an answer to your last demand:

Do[
 q = Prime[n] Times@@@Rest[Subsets[Table[Prime[k], {k, 2, n - 1}]]];
 twin = Intersection[Select[q - 4, PrimeQ] + 2, Select[q - 2, PrimeQ]];
 Print["n = ", n, " - ", twin, " - ", Length[twin]],
 {n, 3, 20}]

The pattern breaks at $n=9$, since there are $8$ and not $7$ pairs of twin primes. For $n=20$ there are $2674$ pairs.

I have included the possibility of $m=2$, since you use it (although in the question you say $2<m<n$.)