My Birthday Problem

Find the last two nonzero digits of 90 ! 90! .


The answer is 12.

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

Margaret Yu
Jun 2, 2016

90 ! = 1 × 2 × 3 × 4 × 5 × . . . × 89 × 90 90! = 1 \times 2 \times 3 \times 4 \times 5 \times ... \times 89 \times 90

We can rearrange the factors of 90! into:

( 5 × 10 × 15 × . . . × 85 × 90 ) × ( 1 × 2 × 3 × 4 ) × ( 6 × 7 × 8 × 9 ) × ( 11 × 12 × 13 × 14 ) × ( 16 × 17 × 18 × 19 ) × . . . × ( 81 × 82 × 83 × 84 ) × ( 86 × 87 × 88 × 89 ) (5 \times 10 \times 15 \times ... \times 85 \times 90) \times (1 \times 2 \times 3 \times 4 ) \times (6 \times 7 \times 8 \times 9) \times (11 \times 12 \times 13 \times 14) \times (16 \times 17 \times 18 \times 19 ) \times ... \times (81 \times 82 \times 83 \times 84) \times (86 \times 87 \times 88 \times 89)

Factoring out the 5's,

5 18 × 18 ! × ( 1 × 2 × 3 × 4 ) × ( 6 × 7 × 8 × 9 ) × ( 11 × 12 × 13 × 14 ) × ( 16 × 17 × 18 × 19 ) × . . . × ( 81 × 82 × 83 × 84 ) × ( 86 × 87 × 88 × 89 ) 5^{18} \times 18! \times (1 \times 2 \times 3 \times 4 ) \times (6 \times 7 \times 8 \times 9) \times (11 \times 12 \times 13 \times 14) \times (16 \times 17 \times 18 \times 19 ) \times ... \times (81 \times 82 \times 83 \times 84) \times (86 \times 87 \times 88 \times 89)

Let us consider (10 a + 1)(10 a + 2)(10 a + 3)(10 a +4) and (10 a + 6)(10 a + 7)(10 a + 8)(10 a + 9)

This expression is a generalized format of the terms (1 \times 2 \times 3 \times 4 ) and (6 \times 7 \times 8 \times 9), respectively.

Simplifying these two expressions, we'll get:

10000 a 4 + 10000 a 3 + 3500 a 2 + 500 a + 24 10000a^{4} + 10000a^{3}+ 3500a^{2}+500a+24 and 10000 a 4 + 30000 a 3 + 33500 a 2 + 16500 a + 3024 10000a^{4} + 30000a^{3}+ 33500a^{2}+16500a+3024

We can disregard the first four terms because they contain at least 2 trailing zeroes

We can generalize that the last two digits of the terms of the form (10 a + 1)(10 a + 2)(10 a + 3)(10 a +4) and (10 a + 6)(10 a + 7)(10 a + 8)(10 a + 9) is 24 .

Therefore, the last two digits of 90! is equal to the last two digits of 5 18 × 18 ! × 2 4 18 = 5 18 × 18 ! × 2 18 × 2 36 × 3 18 5^{18} \times 18! \times 24^{18} = 5^{18} \times 18! \times 2^{18} \times 2^{36} \times 3^{18}

By observation,

  1. the last digit of ( 2 10 ) e v e n (2^{10})^{even} is 76

  2. the last digit of ( 2 10 ) o d d (2^{10})^{odd} is 24

  3. the last digit of ( 3 4 ) 1 m o d 5 (3^{4})^{1 mod 5} is 81

  4. the last digit of ( 3 4 ) 2 m o d 5 (3^{4})^{2 mod 5} is 61

  5. the last digit of ( 3 4 ) 3 m o d 5 (3^{4})^{3 mod 5} is 41

  6. the last digit of ( 3 4 ) 4 m o d 5 (3^{4})^{4 mod 5} is 21

  7. the last digit of ( 3 4 ) 5 m o d 5 (3^{4})^{5 mod 5} is 01

Finding the last two digits of 18 ! × 2 36 × 3 18 = > ( 2 10 ) 3 × 2 6 × ( 3 4 ) 4 × 3 2 × 18 ! 18! \times 2^{36} \times 3^{18} => (2^{10})^{3} \times 2^{6} \times (3^{4})^{4} \times 3^{2} \times 18!

= > ( 24 ) × 2 6 × ( 21 ) × 3 2 × 18 ! = > ( 24 ) ( 64 ) ( 21 ) ( 9 ) × 18 ! = > 04 × 18 ! => (24) \times 2^{6} \times (21) \times 3^{2} \times 18! => (24)(64)(21)(9) \times 18! => 04 \times 18!

The last two digits of 18! can be solved like how we solved earlier:

( 5 × 10 × 15 ) × ( 1 × 2 × 3 × 4 ) × ( 6 × 7 × 8 × 9 ) × ( 11 × 12 × 13 × 14 ) × ( 16 × 17 × 18 ) (5 \times 10 \times 15) \times (1 \times 2 \times 3 \times 4 ) \times (6 \times 7 \times 8 \times 9) \times (11 \times 12 \times 13 \times 14) \times (16 \times 17 \times 18)

= 5 3 × 3 ! × ( 2 4 3 × ( 16 × 17 × 18 ) = > 6 × 5 3 × 2 3 × 1 2 3 × 96 = > 6 × 1 2 3 × 96 5^{3} \times 3! \times (24^{3} \times (16 \times 17 \times 18) => 6 \times 5^{3} \times 2^{3} \times 12^{3} \times 96 => 6 \times 12^{3} \times 96

Therefore, the last two digits of 90! is equivalent to the last two digits of 04 × 6 × 1 2 3 × 96 04 \times 6 \times 12^3 \times 96 = 12 \boxed{12}

What are the values that can be taken in a?

Shashank Sambarapu - 3 years, 2 months ago

Using The calculator

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...