Finding primes from 6 integers closest to two twin primes multiplied together.

64 Views Asked by At

We are given the twin primes $a$ and $b$, where $a > 5$. We are told that only one of the following: $ab-3, ab-2, ab-1, ab+1, ab+2, ab+3$ will sometimes generate a prime but not always.

It's clear straight away that ab-3, ab+3, ab-1 and ab+1 can never be prime since ab when multiplied together is odd and therefore adding an odd to odd gives you an even number so therefore never prime.

That leaves only $ab-2$ and $ab+2$ that could possibly generate a prime number. Through some calculations I found it can only be $ab+2$ but I can't seem to find a proof of why, I'm guessing it's something to do with the fact that $ab-2$ but be a multiple of 3 or 5 but I'm not 100% sure.

Any help would be greatly appreciated and if anything is unclear please let me know, cheers.

3

There are 3 best solutions below

0
On

If $a\equiv 1\pmod{3}$ then $b\equiv a+2\equiv 0\pmod{3}$, is impossible as $b>5$. So, it must be that $a\equiv 2\pmod{3}$ and so $b\equiv 1\pmod{3}$. So, $ab-2\equiv 1\cdot 2-2\equiv 0\pmod{3}$.

3
On

Let's say $3<a<b$. We note that $$a\equiv 1 \pmod 3\implies b=a+2\equiv 0 \pmod 3$$ so we must have $a\equiv 2\pmod 3$ and $b\equiv 1 \pmod 3$

Thus $ab\equiv 2 \pmod 3$ whence, $$ab-2\equiv 0 \pmod 3$$

Thus $ab-2$ can't be prime if it exceeds $3$.

0
On

Similar thinking as in the previous answers. For all twin primes $(a,b),\ a>5$ it is the case that $a=6k-1,\ b=6k+1$. Thus $ab=36k^2-1$. Plainly $3\mid (36k^2-3)=ab-2$. So $ab+2$ is the only remaining option, as you found empirically.