Exercise 3.10

If n is not a prime, show that ( n − 1 ) ! ≡ 0 ( mod n ) , except when n = 4 .

Answers

Proof.

Suppose that n > 1 is not a prime. Then n = uv , where 2 ≤ u ≤ v ≤ n − 1 .

∙ If u ≠ v , then n = uv ∣ ( n − 1 ) ! = 1 × 2 × ⋯ × u × ⋯ × v × ⋯ × ( n − 1 ) (even if u ∧ v ≠ 1 !).

∙ If u = v , then n = u 2 is a square.

If u is not prime, u = st , 2 ≤ s ≤ t ≤ u − 1 ≤ n − 1 , and n = u ′ v ′ , where u ′ = s , v ′ = s t 2 verify 2 ≤ u ′ < v ′ ≤ n − 1 . As in the first case, n = u ′ v ′ ∣ ( n − 1 ) ! .

If u = p is a prime, then n = p 2 .

In the case p = 2 , n = 4 and n = 4 ∤ ( n − 1 ) ! = 6 . In the other case, p > 2 , and ( n − 1 ) ! = ( p 2 − 1 ) ! contains the factors p , 2 p , where 1 < p < 2 p < p 2 , so p 2 ∣ ( p 2 − 1 ) ! , that is n ∣ ( n − 1 ) ! .

Conclusion : if n is not a prime, ( n − 1 ) ! ≡ 0 ( mod n ) , except when n = 4 . □

User profile picture
2022-07-19 00:00
Comments