题主的视力堪忧……原句是这样的:
With the sole exception of 4, where 3! = 6 ≡ 2 (mod 4), if n is composite then (n − 1)! is congruent to 0 (mod n).
译:对于合数n,除了n=4时有3! = 6 ≡ 2 (mod 4)之外,总是有(n-1)! ≡ 0 (mod n)。
本来就没在说质数啊……至于证明就在这一段的后面:
The proof is divided into two cases: First, if n can be factored as the product of two unequal numbers, n =ab, where 2 ≤ a<b ≤ n − 2, then both a and b will appear in the product1 × 2 × ... × (n -1) = (n -1)!and (n − 1)! will be divisible by n. If n has no such factorization, then it must be the square of some prime q, q > 2. But then 2q < q2 = n, both q and 2q will be factors of (n − 1)!, and again n divides (n − 1)!.
若n为合数,则n可以写成两个小于n的数的乘积:n = ab
1) 若a不等于b,那么a和b都出现在(n-1)!中,于是n|(n-1)!
2) 若不存在a不等于b的分解,这意味着n是质数q的平方,当n>4时,q>2,于是q和2q都出现在(n-1)!中,于是n| (n-1)!。
唯一的例外就是n=4,此时q=2,在1、2、3中质因数2只出现了一次。