0

I need to find the remainder when $ 20!+20^{23} $ is divided by 23 . .please help. Wilson theorem involved , Fermat's little theorem involved as well.

pidude
  • 151
user16289
  • 19
  • 2
  • Yes, you know the right ingredients. See also http://math.stackexchange.com/a/99879/589. – lhf Jul 02 '14 at 18:41

1 Answers1

2

Using Fermat's Little Theorem: $$20!+20^{23} \equiv 20!+20 \pmod{23}$$ Let's now solve this equation: $$20!+20 \equiv x\pmod{23}$$

$$(22*21)(20!+20) \equiv (22*21)x\pmod{23}$$

$$22!+(22*21)20\equiv (22*21)x\pmod{23}$$ Using Wilson's Theorem: $$-1+(22*21)20 \equiv (22*21)x\pmod{23}$$

$$-1+(-1*(-2))(-3) \equiv (-1*(-2))x\pmod{23}$$

$$-7\equiv 2x\pmod{23} $$

$$8 \equiv x\pmod{23}$$

King Ghidorah
  • 617
  • 5
  • 22