### Goldbach's conjecture – and more: Even numbers n > 4208 are sums of two primes (twins!)

Prime twins (or twin primes) are odd prime numbers that come in pairs: {3, 5}, {11, 13}, {17, 19}, {29, 31}. Primes in each twin pair differ by two. One can prove that each prime twin pair except {3, 5} has the form {6i – 1, 6i + 1} for a certain integer i. On this page, we will investigate the following hypotheses:

(A) Every even number n > 4208 can be written as a sum of two twin primes.
(B) Every positive even number can be written as a difference of two twin primes.

For comparison, here are two famous (weaker) conjectures:
Goldbach's conjecture: Every even number n > 2 can be written as a sum of two primes.
Twin prime conjecture: There are infinitely many twin primes.

If statements (A) and (B) are true, then Goldbach's conjecture must be true and the twin prime conjecture must be true, too. The table below presents a partial computational check of the above statements (A) and (B). For each n, the table shows only one of many existing representations of n as a difference of twin primes; n = 4208 is the last line in the table showing a difference only (since no sums were found). Apparently, for all even n ≥ 4210, representations of n as a sum of two twin primes do exist. Note that this is not a proof, just an illustration: both statements (A) and (B) are plausible. (The twin prime conjecture and Goldbach's conjecture are almost certain to be true – but not proven as of 2011.)

```     n   # of sums  -p+q  p+q  (n as a sum/difference of two twin primes p and q)

function sumOfTwins(start,stop) {
var m,nsums,str;

if (start<2) start=2;
start = Math.floor(start); start = start + start%2;

if (stop==null || stop<start) stop=start+10;
stop = Math.floor(stop);  stop = stop + stop%2;

getTwins(stop+1000);

for (var n=start; n<=stop; n+=2) {
nsums = 0;
str = '';
m = -3*n;
for (var k = -1; k>m; k-=2) {
if (isTwin[-k] && isTwin[n-k]) {
str += '  ' + k + '+' + (n-k);
break;
}
}
m = Math.floor(0.5*n);
for (var k=1;k<=m;k+=2) {
if (isTwin[k] && isTwin[n-k]) {
str += '  ' + k + '+' + (n-k);
nsums++;
}
}
document.writeln( format6(n)+' '+format6(nsums)+'    '+str)
}
}

sumOfTwins(start=2,stop=4400)

```