## How many zeros ????

A forum for good logic/math puzzles.

Moderators: jestingrabbit, Moderators General, Prelates

Moonbeam
Posts: 289
Joined: Sat Dec 08, 2007 5:28 pm UTC
Location: UK

### How many zeros ????

I wasn't sure whether to post this in maths, or in here, so ..... well, it's here now (unless a mod decides to move it ).

Consider the number 100!

How many zeros are there at the end of 100! ????

Wednesday
Posts: 901
Joined: Fri May 22, 2009 6:31 pm UTC
Location: Oakland, CA

### Re: How many zeros ????

... There are two zeros in the number 100. And I suppose an infinate number after a decimal point.
Sexts From The Void wrote:i struggle to maneuver on a chessboard of dicks

Moonbeam
Posts: 289
Joined: Sat Dec 08, 2007 5:28 pm UTC
Location: UK

### Re: How many zeros ????

horisustar wrote:... There are two zeros in the number 100. And I suppose an infinate number after a decimal point.

I think you missed the !

The question asked "How many zeros are there at the end of 100! ????" (Note the ! - denoting "factorial").

Wednesday
Posts: 901
Joined: Fri May 22, 2009 6:31 pm UTC
Location: Oakland, CA

### Re: How many zeros ????

Oh. Meh. Im not really in the mood to think anything maths-y. Sorry. Ill come back and contribute later.
Sexts From The Void wrote:i struggle to maneuver on a chessboard of dicks

CueBall
Posts: 477
Joined: Sun Apr 26, 2009 6:50 pm UTC
Location: Somewhere with a gherkin in the middle.
Contact:

### Re: How many zeros ????

Numbers which add a 0 to the end:

Anything with 5 as a factor

(There is an abundance of things with 2 as a factor)

so, 5, 10, 15... 100

that's 20.

However, 25, 50, 75 and 100 all have 5 as a factor twice.

So I make it 24 0's.
Spoiler:
Zohar wrote:Cueball is being generally hilarious today.
Sungura wrote:Cueball, I...I...
...
<3
Box Boy wrote:Now let us wait for the outcome of CueBall's fight to the death!

Poohblah
Posts: 53
Joined: Thu Feb 26, 2009 3:54 am UTC

### Re: How many zeros ????

Spoiler:
like the above poster said, this is determined by the number of factors of 10. We have 10, 20, 30... 100 to make 11 factors of 10. There are an abundance of factors of 2, far more then there are of 5, so we can just add all the factors of 5 up. There are 20 different numbers no more than 100 with a factor of 5, minus the 11 we have already counted to make 20. Then we can add the factors of 5 that appear twice in a number - 25, 50, 75, 100. That's 24. Exactly the same as the above poster got.

Macbi
Posts: 941
Joined: Mon Apr 09, 2007 8:32 am UTC
Location: UKvia

### Re: How many zeros ????

A good rough estimation is just to divide by four. In fact it's always an overestimation, so a better one is to divide by 4, subtract one, and round up. Here that gives the exact answer. Puzzle: Why does this estimation work?
Indigo is a lie.
Which idiot decided that websites can't go within 4cm of the edge of the screen?
There should be a null word, for the question "Is anybody there?" and to see if microphones are on.

silvermace
Posts: 77
Joined: Mon Apr 20, 2009 7:56 pm UTC

### Re: How many zeros ????

Spoiler:
100! =

9332621544394415268169923885626670049071596826438162146859
29638952175999932299156089414639761565182862536979208272237582511852109168
64000000000000000000000000

skeptical scientist
closed-minded spiritualist
Posts: 6142
Joined: Tue Nov 28, 2006 6:09 am UTC
Location: San Francisco

### Re: How many zeros ????

Macbi wrote:A good rough estimation is just to divide by four. In fact it's always an overestimation, so a better one is to divide by 4, subtract one, and round up. Here that gives the exact answer. Puzzle: Why does this estimation work?

Spoiler:
The number of zeros at the end of the decimal representation to n!, is, as previously noted, determined entirely by the largest power of 5 which divides n!. Of every number below n, exactly n/5 of them are divisible by 5 (rounding down). Also, n/25 of them (again round down) are divisible by 5, n/125 of them are divisible by 125, and so on. So the total number of zeros at the end of n! is about n/5+n/25+n/125+n/625+...=n/4. This is an overestimation because you should round all of the terms of the sum down before adding, and they can't all be integers. Since the number of zeros must be an integer, if you round this up you are overestimating by at least one, so you can round up and then subtract 1. This is still not exact, however; for example, 24/4-1=5, but 24! has 4 zeros at the end of it. In fact, this can overestimate by a very large amount: consider the case when n=5k-1, and k is a big number.
I'm looking forward to the day when the SNES emulator on my computer works by emulating the elementary particles in an actual, physical box with Nintendo stamped on the side.

"With math, all things are possible." —Rebecca Watson

Nitrodon
Posts: 497
Joined: Wed Dec 19, 2007 5:11 pm UTC

### Re: How many zeros ????

The real answer for any n:
Spoiler:
Subtract the sum of the digits of the base 5 representation of n, then divide by 4.

munchman
Posts: 50
Joined: Tue Nov 11, 2008 5:43 am UTC
Contact:

### Re: How many zeros ????

Sorry to post so late, but consider the following:
Spoiler:
There are no zeroes at the end of "100!", simple!

There's No Place Like 127.0.0.1
Compaq Presario CQ60. 2GB Ram, Intel Celeron Dual Core Processor, Windows Vista Home Premium. 250 GB HDD