Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need a justification for my observation. In general, we can list twin prime pairs in $(6n-1, 6n+1)$, where $n$ is some positive number. Of course, this is valid except $(3, 5)$. Now, I construct, for any such twin primes pair will satisfy the following my observation.

$$4(6n-2)! = -3(1+2n)\pmod{ 36n^2 - 1}$$

Is my observation is true or not? I have checked for many pairs. Fortunately, the equation holds for any such twin pair. Could you explain the generalization of my statement or observation.

share|cite|improve this question
Are you familiar with Wilson's Theorem? – Gerry Myerson Nov 10 '12 at 8:09
up vote 0 down vote accepted

I will give few details about Clement's Theorem. The rest you can complete.

For n > 1, consider n, n + 2 are twin primes iff 4(n-1)!+1 +n = 0 (mod n(n+2)). From the Wilson’s theorem we have (n-1)!+ 1= 0 (mod n) . 4(n-1)! + 1 + n = 4(0)+n = 0 (mod n). Since n + 2 also prime, (n+1)!+ 1 = 0 (mod n+2) and 4(n-1)! + 1 +n = 2[2(n-1)!+2] + n = 2[(-1)(-2)(n-1)!+2]+n = 0 (mod (n+2)).

share|cite|improve this answer
!Thank U so much and your solution can complete by CRT. – madfellow Nov 10 '12 at 10:30

By Wilson's theorem, $(p-1)!\equiv-1\bmod p$ if and only if $p$ is a prime. So assume that $6n-1$ and $6n+1$ are primes. Then $(6n-2)!\equiv-1\bmod(6n-1)$, and $(6n)!\equiv-1\bmod(6n+1)$. The second congruence can be rewritten as $(6n-2)!\equiv-1(-1)^{-1}(-2)^{-1}=-2^{-1}\bmod(6n+1)$.

Multiplying both congruences by $4$ yields


Now we just have to check that these are indeed the residues of $-3(1+2n)$.

share|cite|improve this answer
@Jorki!I rechecked with Wilson concept and it is simply we can derive as per your suggestion. Thank you. – madfellow Nov 10 '12 at 8:52

Writing your twin primes as $(p, p+2)$, your observation can be rewritten as:

$4(p-1)! = -4-p$ (mod $p^2 + 2p$).

This is known as Clement's Theorem.

Note, by the way, that this is an if and only if statement: the above relation is satisfied if and only if $(p, p+2)$ are twin primes.

(And yes, Wilson's Theorem is typically used to prove Clement's Theorem. Cf. Theorem 2 here.)

share|cite|improve this answer
.!I do not know the proof except the statement of Clement's Theorem. But, my post can be done by Wilson's theorem. – madfellow Nov 10 '12 at 8:53
@madfellow Right; see edit. – Benjamin Dickman Mar 28 '14 at 22:48

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.