0

Question!

Show that the pair of positive integers $n$ and $n+2$ are twin primes if and only if $$4[(n-1)! + 1] + n = 0 \ (\text{mod} \ n(n+2)),$$ where $n$ does not equal $1$.

Seirios
  • 33,157
Sonia
  • 9

1 Answers1

2

HINT:

$\displaystyle(n-1)!\equiv-1\pmod n$ iff $n$ is prime

So, $\displaystyle4[\underbrace{(n-1)!+1}]+n \equiv0\pmod n$

Similarly, $\displaystyle(n+1)!\equiv-1\pmod{n+2}$ iff $n+2$ is prime

Now, $\displaystyle(n+1)!=(n+1)n\cdot(n-1)!\equiv-1\cdot-2\cdot(n-1)!\pmod{n+2}\equiv2\cdot(n-1)!$

$\displaystyle\implies 4[(n-1)!+1]+n=2\cdot 2\cdot(n-1)!+4+n\equiv2(-1)+4+n\pmod{n+2}\equiv0$

Again $\displaystyle(n,n+2)=(n,2)$ So, for odd $n, (n,n+2)=1$

So, if $n|a, (n+2)|a\implies n(n+2)|a$