2

Found this question on a previous exam:

What is the answer of the following expression?

$$(1!+2!+3!...+100!)\pmod{18} =$$

The answer $0$ isn't right!

If you know the answer please explain me it step by step.

Any help will be appreciated!

Cameron Buie
  • 102,994
Gil
  • 707

1 Answers1

6

As noted in the comments, if $18$ divides $n!$, then you can ignore that particular term. Now, $18$ divides $6!$ and therefore any factorial greater than or equal to $6!$. So we are left with $1!+2!+3!+4!+5!=1+2+6+24+120 \equiv 9\pmod {18}$.

Thomas Andrews
  • 177,126
Alexander
  • 4,292