0

Verify that $4(29!)+5!$ is divisible by $31$

I know I have to use Wilsons theorem: $(p-1)!=-1\pmod p$ but I'm not really sure how to apply this theorem. Step by step explanation please? Thank you!

Hakim
  • 10,311
Lil
  • 2,631

3 Answers3

6

Wilson's theorem says $$(p-1)!\equiv -1\pmod p$$ when $p$ is prime. Taking $p=31$, we have $$30!\equiv -1\pmod {31}.$$

Since $30\equiv -1\pmod{31}$, we have $$29!\equiv 1\pmod{31}$$ and $$4\cdot 29!\equiv 4\pmod{31}.$$

By direct calculation, $$5!\equiv -4\pmod{31}$$

so $$4\cdot29! + 5! \equiv 4+(-4)= 0\pmod{31}$$

and we are done.

MJD
  • 67,568
  • 43
  • 308
  • 617
2

Since $29!$ is a multiple of $11$ then $4\times 29!\equiv 0\mod 11$ so $$4\times 29!+5!\equiv 5!=120\equiv-1\mod 11$$ so the answer is No: the given number isn't a multiple of $11$.

0

[This answer applies to the original question on division by $11$ vs. $\,31$]

Hint $\ n\le m\,\Rightarrow\, n\mid m!\, $ and prime $\,p > k\,\Rightarrow\,p\nmid k!\ $ since $\,p\mid k\cdots 3\cdot 2\,\Rightarrow\, p\mid k\,$ or $\,\cdots p\mid 2.$

Bill Dubuque
  • 282,220