Monday, 5 January 2026

Exercise (4.2).8

Determine $(n− 1)!  \pmod {n}$ for each of the following $n$:

(a) $n = 15$

(b) $n = 21$

(c) $n = 30$

What do you notice about your results?


(a) Since $n=15$ is not prime, we can't immediately use Wilson's Theorem.

We note that

$ 14! \equiv 0 \pmod 3$ because 3 is a factor of 14!

$ 14! \equiv 0 \pmod 5$ because 5 is a factor of 14!

Using the result from Exercise (3.1).24(d) we have

$$ 14! \equiv 0 \pmod {15} $$


(b) Again, since $n=21$ is not prime, we can't use Wilson's Theorem.

We note that

$ 20! \equiv 0 \pmod 3$ because 3 is a factor of 20!

$ 20! \equiv 0 \pmod 7$ because 7 is a factor of 20!

Using the result from Exercise (3.1).24(d) we have

$$ 20! \equiv 0 \pmod {21} $$


(b) Again, since $n=30$ is not prime, we can't use Wilson's Theorem.

We note that

$ 29! \equiv 0 \pmod 2$ because 2 is a factor of 29!

$ 29! \equiv 0 \pmod 3$ because 3 is a factor of 29!

$ 29! \equiv 0 \pmod 7$ because 7 is a factor of 29!

Using the result from Exercise (3.1).24(d) we have

$$ 29! \equiv 0 \pmod {30}$$


We notice that the expression  $(n− 1)!  \pmod {n}$  is congruent to $0$. This is because the selected $n$ are not prime, and the prime factors of $n$ are factors of $(n-1)!$. This will always be the case because those factors are always less than or equal to $(n-1)$.