[Math] Quicker way to solve 10! congruent to x (mod 11)

elementary-number-theorymodular arithmetic

I am new to modular arithmetic and solving congruences and the way I went about this was to write out $10\cdot 9\cdot 8\cdot 7\cdot 6\cdot 5\cdot 4\cdot 3\cdot2$, then multiply numbers until I get a number greater than $11$, replace it with a smaller number in its congruence class and repeat. Is there a quicker way to go about this? The next question I must solve is $100!\equiv x \pmod {101}$.

Best Answer

Wilson's Theorem states that for any prime number $n$, you get $$(n-1)! \equiv -1 (mod\ n).$$

$10!$ makes $n = 11$, which is prime, so $10! \equiv -1 (mod\ 11) \equiv 10 (mod\ 11)$

Likewise, $100!$ makes $n = 101$, which is prime, so $100! \equiv -1 (mod\ 101) \equiv 100 (mod\ 101)$.