This is so last decade

What is the smallest positive integer n n such that n ! n! has a string of 500 zeros at the end of its decimal representation?


The answer is 2005.

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.

3 solutions

If you want 500 zeroes at the end of its decimal you have to have at least 500 fives and way to find numbers of five is

Let n! be an integer then n! have 5's in its as can be found by n 5 + n 25 + n 125 + n 625 + . . . \left \lfloor \frac{n}{5} \right \rfloor+\left \lfloor \frac{n}{25} \right \rfloor+\left \lfloor \frac{n}{125} \right \rfloor+\left \lfloor \frac{n}{625} \right \rfloor+...

So we can find n as

500 = n 5 + n 25 + n 125 + n 625 + . . . n ( 5 4 1 ) = n 4 500=\left \lfloor \frac{n}{5} \right \rfloor+\left \lfloor \frac{n}{25} \right \rfloor+\left \lfloor \frac{n}{125} \right \rfloor+\left \lfloor \frac{n}{625} \right \rfloor+... \approx n(\frac{5}{4}-1)=\frac{n}{4}

n 2000 n \approx 2000

Now we have to check that if we have enough 5's

400 + 80 + 16 + 3 = 499 400+80+16+3=499 this tell us that we have to find more 5's and so just plus with 5 and then we've got 2005 \boxed{2005}

Aditya R Mohan
Jun 15, 2015

The number of zeroes at the end of n! depends on the number of independent 5s present in it. Let X be the number.
Multiples of 5 add one zero
Multiples of 25 add two zeroes
Multiples of 125 add 3 zeroes &
Multiples of 625 add 4 zeroes at the end.



So considering the inequality, (X/5)+(X/25)+(X/125)+(X/625) > 500

We get X=2005

Moderator note:

Are you sure that

(X/5)+(X/25)+(X/125)+(X/625) > 500

is the right inequality to use?

Denton Young
Jun 14, 2015

To generate zeros at the end of n! we need to add multiples of 5. (There will be more multiples of 2 than multiples of 5, so every factor of 5 added generates a factor of 10 and hence a new trailing zero.)

5! has 1 trailing 0. the next one is added when we reach 10! when we reach 25! two zeros are added, giving us a total of 6. (25 adds two factors of 5.) so at 50! we have 12, 75! we have 18, 100! we have 24, and at 125! we have 31 (125 adds three zeros, since it has 3 factors of 5.)

31 * 5 = 155, but we have to add 1 because 625 has four fives in it, so at 625! we have 156 zeros.

since 156 * 3 = 468, at (625 * 3) = 1875! we have 468 zeros. by adding another 125 we add 31 zeros, so 2000! has 499 zeros. one more factor of 5 will do, so we go one more step up and at 2005! we have 500 trailing zeros.

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...