Math Is Fun Forum

  Discussion about math, puzzles, games and fun.   Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ • π ƒ -¹ ² ³ °

You are not logged in.

#1 2015-11-22 22:00:10

Ritz
Guest

Trailing zeroes in factorials

How do we find number of trailing zeroes in factorials?

#2 2015-11-22 22:59:04

Bob
Administrator
Registered: 2010-06-20
Posts: 10,140

Re: Trailing zeroes in factorials

hi Ritz

Welcome to the forum.

A new zero will be added when a new factor of 2 and 5 occurs, as 2x5 = 10.  As every other number has 2 as a factor there won't be a shortage of them, so it's down to when does a factor of 5 occur.  The first time is 5! = 24 x 5 = 120.  Then 10! (=3628800) will add another and so on.

Writing a factorial as a product of primes should make this clear:

10! = (5x2) x (3x3) x (2x2x2) x 7 x (3x2) x 5 x (2x2) x 3 x 2 x 1

Bob


Children are not defined by school ...........The Fonz
You cannot teach a man anything;  you can only help him find it within himself..........Galileo Galilei
Sometimes I deliberately make mistakes, just to test you!  …………….Bob smile

Offline

#3 2015-11-23 04:58:14

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Trailing zeroes in factorials

Hi;

There is a popular formula, say you wanted to know the number of trailing zeroes in 10000!. You just keep dividing by powers of 5.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

Board footer

Powered by FluxBB