But it's so large?

Find the last digit of i = 1 1 0 1 0 10 i ! \sum\limits_{i=1}^{10^{10^{10}}} i!

Clarifications: i ! i! is the factorial function on i.


The answer is 3.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

1 solution

We can interpret "finding the last digit" as "report the value modulo 10", because the sum is finite. i = 1 1 0 1 0 10 i ! m o d 10 = ( ( 1 ! m o d 10 ) + ( 2 ! m o d 10 ) + ( 3 ! m o d 10 ) . . . ) m o d 10 \sum\limits_{i=1}^{10^{10^{10}}} i! \mod 10 = ((1! \mod 10) + (2! \mod 10) + (3! \mod 10) ...) \mod 10 by modular arithmetic rules. We claim that for all i 5 i \ge 5 , i ! i! is divisible by 10, and therefore i ! 0 ( m o d 10 ) i! \equiv 0 (\mod 10) for all i 5 i \ge 5 . We prove by induction. For the base case, we have 5 ! = 120 5! = 120 , which is divisible by 10. For the inductive step, we assume n ! n! is divisible by 10, and then show that ( n + 1 ) ! (n+1)! 's divisibility by 10 follows. ( n + 1 ) ! = ( n + 1 ) ( n ) ! (n+1)! = (n + 1)(n)! Since n ! n! is divisible by 10, we can write it as 10 k 10k for some k Z k \in \mathbb{Z} ( n + 1 ) ( n ) ! = ( n + 1 ) ( 10 k ) (n + 1)(n)! = (n + 1)(10k) ( n + 1 ) ( 10 k ) = 10 k n + 10 k (n + 1)(10k) = 10kn + 10k ( n + 1 ) ( 10 k ) = 10 ( k n + k ) (n + 1)(10k) = 10(kn + k) Since k n + k kn + k is an integer, as n , k Z n, k \in \mathbb{Z} , we have that ( n + 1 ) ! (n+1)! is divisible by 10. Thus the induction is complete. We may now rewrite the summation as: ( ( 1 ! m o d 10 ) + ( 2 ! m o d 10 ) + ( 3 ! m o d 10 ) + ( 4 ! m o d 10 ) + ( 0 m o d 10 ) + ( 0 m o d 10 ) + . . . . ) m o d 10 ((1! \mod 10) + (2! \mod 10) + (3! \mod 10) + (4! \mod 10) + (0 \mod 10) + (0 \mod 10) + ....) \mod 10 Any number of zeros added to each other still result in an overall zero answer. By simplifying the factorials, we receive ( 1 + 2 + 6 + 4 ) m o d 10 = 13 m o d 10 = 3 (1 + 2 + 6 + 4) \mod 10 = 13 \mod 10 = 3

Nice application of modular arithmetic. Alternatively, without using induction you could also show that N ! N! can be expressed as M 5 ! M\cdot 5! for some integers where M 1 M \ge 1 for N 5 N \ge 5 . Since we already know that 5 ! 0 ( m o d 10 ) 5! \equiv 0 \pmod{10} , then we can also say that M 5 ! 0 ( m o d 10 ) N ! 0 ( m o d 10 ) M \cdot 5! \equiv 0 \pmod{10} \implies N! \equiv 0 \pmod{10} .

Tapas Mazumdar - 4 years, 2 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...