Skip to main content

AMC 12 Mock Exam 7 Problem 19

Problem 19 of 25

What is the remainder when 28!28! is divided by 899899?

Answer choices

Show solution

Solution

Note that 899=900−1=29⋅31899=900-1=29\cdot31, and both factors are prime.

Modulo 2929. By Wilson's theorem, 28!≡−1(mod29)28!\equiv-1\pmod{29}.

Modulo 3131. By Wilson's theorem, 30!≡−1(mod31)30!\equiv-1\pmod{31}. Since 30!=28!⋅29⋅3030!=28!\cdot29\cdot30 and 29⋅30≡(−2)(−1)=2(mod31)29\cdot30\equiv(-2)(-1)=2\pmod{31}, we get 2⋅28!≡−1≡302\cdot28!\equiv-1\equiv30, so 28!≡15(mod31)28!\equiv15\pmod{31}.

Combining. Write 28!≡28+29t(mod899)28!\equiv28+29t\pmod{899}. Then 28+29t≡15(mod31)28+29t\equiv15\pmod{31}, i.e., −2t≡−13-2t\equiv-13, i.e., 2t≡13≡442t\equiv13\equiv44, so t≡22(mod31)t\equiv22\pmod{31}. Hence 28!≡28+29⋅22=666(mod899)28!\equiv28+29\cdot22=\boxed{666}\pmod{899}. (Check: 666=23⋅29−1666=23\cdot29-1 and 666=21⋅31+15666=21\cdot31+15.)

(Sign slips give the distractors: 28!≡16(mod31)28!\equiv16\pmod{31} leads to 202202; 28!≡1(mod29)28!\equiv1\pmod{29} leads to 697697 or 233233; and 898898 corresponds to −1-1 modulo both primes.)

Tagged: Wilson's theorem and the Chinese remainder theorem