Solving for modular expression?

27 Views Asked by At

I stuck somehow on repetition old math exercises...could someone explain the following expression:

$(n!-1)$ mod $ n $

Thanx

1

There are 1 best solutions below

1
On BEST ANSWER

$n | n!$ so $n! \equiv 0 \pmod{n}$ and hence $(n! - 1) \equiv -1 \pmod{n}$.