even vs odd

True or False?

If we remove the trailing zeroes of the factorial n ! , n!, where n n is a positive integer such that 5 n < 10 , 5 \leq n < 10, then the last digit of the remaining number is even. This is still true for all n 10. n \ge 10.


Hints:

  • 5 ! = 120 12 2 5! = 120 \longrightarrow 12 \longrightarrow 2 is even.
  • 10 ! = 3628800 36288 8 10! = 3628800 \longrightarrow 36288 \longrightarrow 8 is even.
True False

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.

2 solutions

Zico Quintina
May 2, 2018

Removing the trailing zeroes of any whole number k k is the same as dividing it by the largest power of ten that is its factor; the size of this power of ten is, in turn, determined by the number of 2's or the number of 5's, whichever is smaller, in the prime factorization of k k .

For p p a prime, the prime factorization of n ! n! will contain at least one p p for every multiple of p p in its expansion, so for n 2 n \ge 2 , n ! = 1 2 3 4 5 6 7 n n! \color{#333333} = 1 \cdot \color{#20A900}2 \color{#333333} \cdot 3 \cdot \color{#20A900}{4} \color{#333333} \cdot \color{#3D99F6}5 \color{#333333} \cdot \color{#20A900}{6} \color{#333333} \cdot 7 \cdot \ldots \cdot n will clearly always contain more 2's than 5's. Therefore the statement in the problem is true for any n 2 n \ge 2 .

To be more specific, for p p a prime, every multiple of p p in the expansion of n ! n! will contribute one p p to the prime factorization of n ! n! ; however every multiple of p 2 p^2 will contribute two p p 's rather than one, and in general every multiple of p k p^k will contribute k k p p 's. Thus the number of p p 's in the prime factorization of n ! n! is given by

i = 1 n p i \displaystyle\sum_{i=1} \left\lfloor \dfrac{n}{p^i} \right\rfloor

Since the largest power of ten that is a factor of n ! n! is limited by the number of 5's in its prime factorization, removing the trailing zeroes of n ! n! will remove all its 5's and an equal number of 2's. Thus the remaining number will not only be even, but divisible by 2 m 2^m , where

m = i = 1 n 2 i i = 1 n 5 i m=\displaystyle\sum_{i=1} \left\lfloor \dfrac{n}{2^i} \right\rfloor\ - \displaystyle\sum_{i=1} \left\lfloor \dfrac{n}{5^i} \right\rfloor

For example, if n = 37 n=37

m = i = 1 n 2 i i = 1 n 5 i = ( 37 2 + 37 4 + 37 8 + 37 16 + 37 32 ) ( 37 5 + 37 25 ) = ( 18 + 9 + 4 + 2 + 1 ) ( 7 + 1 ) = 26 \begin{aligned} m&=\displaystyle\sum_{i=1} \left\lfloor \dfrac{n}{2^i} \right\rfloor\ - \displaystyle\sum_{i=1} \left\lfloor \dfrac{n}{5^i} \right\rfloor \\ \\ &= \left( \left\lfloor \dfrac{37}{2} \right\rfloor\ + \left\lfloor \dfrac{37}{4} \right\rfloor\ + \left\lfloor \dfrac{37}{8} \right\rfloor\ + \left\lfloor \dfrac{37}{16} \right\rfloor\ + \left\lfloor \dfrac{37}{32} \right\rfloor\ \right) - \left( \left\lfloor \dfrac{37}{5} \right\rfloor\ + \left\lfloor \dfrac{37}{25} \right\rfloor\ \right) \\ \\ &= (18 + 9 + 4 + 2 + 1) - (7 + 1) \\ \\ &= 26 \end{aligned}

so after removing the (eight) trailing zeroes of 37 ! 37! , the remaining number will still be divisible by 2 26 2^{26} .

Naren Bhandari
May 2, 2018

We can notice that for n 5 n\geq 5 n ! = a 0 a 1 a 2 × a n × 1 0 n n ! = a 0 a 1 a 2 a n × ( 2 n × 5 n ) n! = a_0a_1a_2\cdots\times a_n \times 10^n \\ n! = a_0a_1a_2\cdots a_n \times \left({\color{#3D99F6}2^n\times 5^n}\right) it's says that the number of trailing zeroes depend on the prime factors of 2 and 5 in case base is 10. Since the number 2's is greater than 5's in n ! n! and even after removing the trailing n ! n! still has some 2's say 2 r 2^r . Then we can conclude that n ! = 2 ( p 0 p 1 p 3 p n ) 2 r 1 = 2 k n! = 2\left(p_0p_1p_3\cdots p_n\right)\cdot 2^{r-1} = 2k Hence, the last digits non-zeros digit of n ! n! is always even.

In the first part of your solution, I believe you need to change some of your variables in the first two lines; I not certain what a 0 , a 1 , a_0, a_1, etc. represent, but at the very least the n n 's you have in the exponents of 2 n , 5 n 2^n,5^n and 1 0 n 10^n cannot be the same as the n n in n ! n! . I don't yet understand the second part of your solution, will have to look at it again later.

zico quintina - 3 years, 1 month ago

Log in to reply

Thank you for going through my solution. I have fixed it . :)

Naren Bhandari - 3 years, 1 month ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...