I know the smallest $x \in \mathbb{N}$, satisfying $1! + 2! + \cdots + 20! \equiv x\pmod7$ is $5$. I would like to know methods to get to the answer.
Solving for the smallest $x$ : $1! + 2! + \cdots+ 20! \equiv x\pmod 7$
2
$\begingroup$
elementary-number-theory
modular-arithmetic
-
0One natural question, I think, is to find the remainder when $1! + 2! + \cdots + (n-1)!$ is divided by $n$. This is http://oeis.org/A067462 . The problem of when this is zero is apparently of at least minor interest, according to Guy, _Unsolved Problems in Number Theory_: http://oeis.org/A057245 – 2011-12-14
1 Answers
8
Note that each of $7!$, $8!$, $9!,\ldots, 20!$ is congruent to $0$ modulo $7$, since they are all divisible by $7$.
Note that $6!\equiv -1\pmod{7}$ by Wilson's Theorem, which cancels $1!$.
That leaves $2!+3!+4!+5! = 2! + 3!(1 + 4 + 20)$. But $3!\equiv -1\pmod{7}$, and $20\equiv -1\pmod{7}$, so $2!+3!+4!+5! \equiv 2-(1+4-1) = -2\equiv 5\pmod{7}$.
-
0+1,The problem could be solved without Wilson's theorem but it always handy to know and use these tools. – 2011-12-13