Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

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.

share|improve this question
    
One natural question, I think, is to find the remainder when $1! + 2! + \cdots + (n-1)!$ is divided by $n$. This is 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: oeis.org/A057245 –  Michael Lugo Dec 14 '11 at 1:49

1 Answer 1

up vote 8 down vote accepted

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}$.

share|improve this answer
3  
It is implicit in Arturo's answer, but it is interesting to note that $1! + 2! + \cdots + n! \equiv 5$ for any $n \geq 7$. –  Austin Mohr Dec 13 '11 at 22:11
    
+1,The problem could be solved without Wilson's theorem but it always handy to know and use these tools. –  Quixotic Dec 13 '11 at 22:23

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.