5
$\begingroup$

For an exercise, I was asked to compute $5!25! \mod 31$. I noticed that $5! = 120 \equiv -4 \equiv 27 \mod 31$. Therefore we have that $$5!25! \equiv 27 \cdot 25! \mod 31.$$ Because of the congruence of Wilson, I also know that $30! \equiv -1 \mod 31$. We have that $30! \equiv 30 \cdot 29 \cdot 28 \cdot 26 \cdot 27 \cdot 25! \equiv -1 \mod 31$, so I computed $$(30 \cdot 29 \cdot 28 \cdot 26) \equiv (-1 \cdot (-2) \cdot (-3) \cdot (-5)) \equiv 30 \equiv -1 \mod 31.$$ Hence we find that $-1 \cdot (27 \cdot 25!) \equiv -1 \mod 31$ and therefore $27 \cdot 25! \equiv 1 \mod 31$. This proves that $5!25! \equiv 1 \mod 31$.

Is this correct?

2 Answers 2

5

I think your answer is ok, but I would rewrite it as follows $$ 5! = 5 \cdot 4 \cdot 3 \cdot 2 \cdot 1 \equiv (-26) \cdot (-27) \cdot (-28) \cdot (-29) \cdot (-30) \pmod{31}. $$

Thus $$ 5! \cdot 25! \equiv (-1)^{5} \, 30! \equiv (-1) \cdot (-1) = 1 \pmod{31}, $$ using as you did Wilson's Theorem.

  • 0
    Apparently i preferer to do some double work :D thank you very much!2017-02-17
  • 1
    You're welcome. It is well-known that laziness is a fundamental motivation for mathematicians - the less you can do, the better! ;-)2017-02-17
0

$$5!25!\equiv\left(15!\right)^2\equiv1^2=1$$