1. ## 2 Modulo questions

We're working with modulos in my number theory class, so I'm sure that's how I am supposed to go about doing these problems. I just can't think of the proper approach...

a)Find the remainder when 5^10 is divided by 19.

b)Find the final digit of 1! + 2! + 3! + ... + 10!

2. These questions usually call for a divide and conquer approach. That is, simplify the problem by breaking it into bits.
a)Find the remainder when 5^10 is divided by 19.
Note that $\displaystyle 5^{10} = (5^2)^5$, and that $\displaystyle 5^2 \equiv 25 \equiv 6 \pmod{19}$. Thus $\displaystyle (5^2)^5 \equiv 6^5 \pmod{19}$. Note that $\displaystyle 6^5 = 6^2 \times 6^2 \times 6^1$, and $\displaystyle 6^2 \equiv 36 \equiv 17 \pmod{19}$. So $\displaystyle 6^5 \equiv 17 \times 17 \times 6 \pmod{19}$. Note that $\displaystyle 17^2 \equiv 289 \equiv 4 \pmod{19}$, so $\displaystyle 17^2 \times 6 \equiv 4 \times 6 \equiv 24 \equiv 5 \pmod{19}$. So $\displaystyle 5^{10} \equiv 5 \pmod{19}$.

b)Find the final digit of 1! + 2! + 3! + ... + 10!
To find the last digit of this expression, consider it modulo 10 (for example, the last digit of 718 is $\displaystyle 718 \equiv 8 \pmod{10}$). Let's start with the small factorials : $\displaystyle 1! = 1$, $\displaystyle 2! = 2$, $\displaystyle 3! = 6$. Now $\displaystyle 4! \equiv 3! \times 4 \equiv 6 \times 4 \equiv 24 \equiv 4 \pmod{10}$. Next one : $\displaystyle 5! \equiv 4! \times 5 \equiv 4 \times 5 \equiv 20 \equiv 0 \pmod{10}$. Continue like this up to 10! (note that $\displaystyle 10! \equiv 0 \pmod{10}$ since it divides 10) ,then sum up all the last digits and take the last digit of this sum and you are done

Does it make sense ?

3. 5! up to 10! will all be congruent to 0 (mod 10) right?

5! = 4! x 5 = 4 x 5 = 20 = 0 (mod 10)
6! = 5! x 6 = 0 x 6 = (0 mod 10)
7! = 6! x 7 = 0 x 7 = (0 mod 10)
...and so on

So 1+2+6+4 = 13 which means my answer is 3?

4. Yes indeed you are right, since $\displaystyle 5!$ divides $\displaystyle 2$ and $\displaystyle 5$ so it divides $\displaystyle 10$. And so the last digit of this sum of factorials is indeed $\displaystyle 3$

5. Hello, jzellt!

You are right!

b)Find the final digit of $\displaystyle S \;=\;1! + 2! + 3! + 4! + \hdots + 10!$

We have: .$\displaystyle S \;=\;1 + 2 + 6 + 24 + 5! + 6! + \hdots + 10!$

$\displaystyle \text{Hence: }\;S \;=\;33 + \underbrace{5! + 6! + \hdots + 10!}_{\text{All of these end in 0}}$
. .
All the factorials, starting with 5!, contain a factor of 10 (at least).

Therefore, $\displaystyle S$ ends in 3.