# Math Help - Prime Numbers and Divisibility

1. ## Prime Numbers and Divisibility

What is the remainder when 5!25! is divided by 31?

2. Originally Posted by Aryth
What is the remainder when 5!25! is divided by 31?
$5! 25! \equiv 5! 23! (-7) (-6) \equiv 5! 23! 11 \mod 31$

................. $\equiv 5! 22! 5 \mod 31$

................. $\equiv 5! 21! 17 \mod 31$

etc

CB

3. Or use Wilson’s theorem.

$30!\equiv-1\pmod{31}$

$30\times29\times28\times27\times26\equiv(-1)(-2)(-3)(-4)(-5)\pmod{31}\equiv-5!\pmod{31}$

$\therefore\ 5!25!\equiv-30!\pmod{31}\equiv1\pmod{31}$