According to OEIS Sequence A002822(https://oeis.org/A002822), it states that $6n+1$ is a twin prime $iff$ $n$ is not of the form $6ab \pm a \pm b$. I was wondering if anyone had a proof for this.
Thanks!
According to OEIS Sequence A002822(https://oeis.org/A002822), it states that $6n+1$ is a twin prime $iff$ $n$ is not of the form $6ab \pm a \pm b$. I was wondering if anyone had a proof for this.
Thanks!
One must specify here: $a, b$ are positive integers. Obviously $a=0,b=n$ does not qualify.
If $n = 6ab + a + b$, then $6n+1 = (6a+1)(6b+1)$ is composite. Similarly, if $n = 6ab -a - b$, $6n+1 = (6a-1)(6b-1)$ is composite. If $n = 6ab-a+b$ then $6n-1 = (6a+1)(6b-1)$ is composite, and if $n=6ab+a-b$ then $6n-1=(6a-1)(6b+1)$ is composite.
Conversely, if $6n\pm 1 = xy$ for some integers $x,y > 1$, $x$ and $y$ must be coprime to $6$, thus $\equiv \pm 1 \mod 6$, so $x = 6a \pm 1$ and $y = 6b\pm 1$, with $a,b$ positive integers to make $x,y>1$. Then $6n \pm 1=(6a \pm 1)(6b \pm 1)$ leads to $n = 6ab \pm a \pm b$.