# Find the remainder when $1!$+$2!$+$3!$…$49!$ is divided by 7?

what is the remainder when 1!+2!+3!+4!+⋯+49! is divided by 7?

MyApproch:

By taking individual numbers as ($1$!+$2$!+$3$!+$4$!+⋯+$49$!)/$7$

I get $1$+$2$+$6$+$3$+$1$+$6$+$0$+$0$.....=$19$/$7$=$5$

But the approach will be too long.I am not able to figure out any other way

Can anyone guide me how to approach the problem?

• Drop all summands that are already divisible by $7$ – Hagen von Eitzen Nov 2 '15 at 10:33
• @HagenvonEitzen It will be too long.I couldn't follow this approach.If you think this is the last option.I will calculate – justin takro Nov 2 '15 at 10:34
• Hint: Your approach will not be too long. Keep going a bit further and find a pattern. – Michael Burr Nov 2 '15 at 10:35
• Evaluating 1+2+6+3+1+6+0+0+0+... mod 7 is not a superhuman task. – Did Nov 2 '15 at 10:37
• Before reading your comment I started and I got pattern from @Michael burr hint.Thanku everyone – justin takro Nov 2 '15 at 10:38

For $k \geq 7$, we have $$7\; \vert\; k!.$$ Hence $$\sum_{k=1}^{49} k! = 1!+2!+3!+4!+5!+6!\equiv1+2+(-1)+3+1+(-1)\equiv5 \pmod{7}.$$
If you're concerned that evaluating the higher factorials will be time consuming, note that $5! + 6! = 5! \times (1 + 6) \equiv 0 \pmod 7$