Find the remainder for $\sum_{i=1}^{n} (-1)^i \cdot i!$ when dividing by 36 $\forall n \in \Bbb N$

41 Views Asked by At

I need to find the remainder $\forall n \in \Bbb N$ when dividing by 36 of:

$$\sum_{i=1}^{n} (-1)^i \cdot i!$$

I should use congruence or the definitions of integer division as that's whave we've seen so far in the course. I don't know where to start. Any suggestions? Thanks!

1

There are 1 best solutions below

0
On BEST ANSWER

Hint:

For $n\geq 6$ one has:

$\sum\limits_{i=1}^n(-1)^ii! = \sum\limits_{i=1}^5(-1)^ii! + \sum\limits_{i=6}^n(-1)^ii!$

Next, notice that for all $i\geq 6$ one has $i!=1\cdot \color{red}{2\cdot 3}\cdot 4\cdot 5 \cdot\color{red}{6}\cdots (i-1)\cdot i$

implying that for $i\geq 6$ one has $36$ divides evenly into $i!$. What does the right sum contribute to the remainder when divided by $36$ then?

From here it should be easy enough to brute force the remainder of the solution.