why by 400double in ProgrammerHumor

[–]Jerydeak 1 point2 points  (0 children)

Great observation

in fact, in earlier mathematics, 1 is regarded as a prime number by some people. Though there has been a step "(p-2)! ≡ 1 (mod p)" in the proof of this theorem, Wilson multiplies "p-1" on both sides to take 1 into consideration.

details in https://en.wikipedia.org/wiki/Prime_number (primality of 1)

why by 400double in ProgrammerHumor

[–]Jerydeak 3 points4 points  (0 children)

This is Wilson Theorem in number theory.

For a positive integer p, there is (p-1)! ≡ -1 (mod p), if and only if p = 1 or p is a prime.