Finding the number of zero's in 'Factorial of a number'
PaGaLGuY.com - The Everything of MBA, CAT 2008, GMAT, XAT, IIM
         Home          MBA Forums         PG Office Blog         Contact Us         About Us                  Jobs @ PG
Exclusive Bschool Content:      Dean Interviews      B-School Watch     MBAs speak     Placements     GMAT & MBA Abroad
» Sponsors





Go Back   PaGaLGuY.com - The Everything of MBA, CAT 2008, GMAT, XAT, IIM > Exam Resources > Quantitative Questions and Answers

Notices
Quantitative Questions and Answers Discuss Quantitative and other Math related questions. Post your math doubts and get it solved by the smartest brains this side of the universe !

Tags: , , ,

Reply
 
LinkBack Thread Tools Display Modes
Finding the number of zero's in 'Factorial of a number'
Old
  (#1)
karthick_prabu
has no status.
Newbie PaGaL
 
karthick_prabu's Avatar
 
Status: Offline
Posts: 5
Join Date: Jan 2007
Location: Chennai
Age: 23
Groans: 0
Groaned at 0 Times in 0 Posts
Thanks: 1
Thanked 8 Times in 2 Posts
Smile Finding the number of zero's in 'Factorial of a number' - 28-01-2007, 08:36 PM

There's a method to find the number of zero's in a 'factorial of a number'.

Formula : round(n/5) + round(n/25) + round(n/125)+.......+round(n/5^n)
Here, round function indicates that only the integer part of (n/5^n) should be taken.

Example1 : Say if you want to find the number of zero's in 5! ??

Usage : In this case n = 5.

-> round(5/5) + round(5/25)+....

->round(1) + round(0)

-> 1 (1 zero in 5!)


Example2 : find the number of zero's in 130! ??

Usage : In this case n = 130.

-> round(130/5) + round(130/25) + round(130/125) ....

->round(36) + round(5) + round(1)

-> 42 (42 zeroes in 130!)


But ma doubt is : can any 1 pls tell me how this formula working ?? put simple : whats the logic of this formula ?
   
Reply With Quote
The Following 7 Users Say Thank You to karthick_prabu For This Useful Post:
*~Sanaa~* (03-06-2008), bindlishsonia (20-04-2007), k_saksena (07-09-2007), nadmaddies (27-06-2007), niravj (01-10-2007), yeahbeesee (12-09-2007), _lakshya (28-01-2007)
Sponsored Links
Re: Finding the number of zero's in 'Factorial of a number'
Old
  (#2)
smilingtears
has no status.
Hardcore PaGaL
 
smilingtears's Avatar
 
Status: Offline
Posts: 548
Join Date: Jan 2006
Location: Solomon Islands
Age: 22
Groans: 74
Groaned at 73 Times in 25 Posts
Thanks: 406
Thanked 566 Times in 145 Posts
Re: Finding the number of zero's in 'Factorial of a number' - 28-01-2007, 09:41 PM

Logic is that you need the combination of 2 and 5 to make a 10..

2*5 = 10..So,if you know how many 5s we have in the required factorial,we can easily find out how many zeroes to expect in that..Number of 2's will be always more than number of fives..so therefore,just knowing how many 5s we have does the job..

waise..isn't this doubt supposed to be on:

http://www.pagalguy.com/forum/quanti...er-system.html (Number System)




  Send a message via Yahoo to smilingtears  
Reply With Quote
The Following 2 Users Say Thank You to smilingtears For This Useful Post:
anarchy (29-01-2007), bindlishsonia (20-04-2007)
Re: Finding the number of zero's in 'Factorial of a number'
Old
  (#3)
karthick_prabu
has no status.
Newbie PaGaL
 
karthick_prabu's Avatar
 
Status: Offline
Posts: 5
Join Date: Jan 2007
Location: Chennai
Age: 23
Groans: 0
Groaned at 0 Times in 0 Posts
Thanks: 1
Thanked 8 Times in 2 Posts
Re: Finding the number of zero's in 'Factorial of a number' - 28-01-2007, 10:54 PM

Ya i completely agree with you that we need to find the number of 5's in the given factorial number.

but, how did the formula --> round(n/5)+round(n/25)+.... arrive?

btwn, thanks for the info smilingtears.
   
Reply With Quote
Re: Finding the number of zero's in 'Factorial of a number'
Old
  (#4)
smilingtears
has no status.
Hardcore PaGaL
 
smilingtears's Avatar
 
Status: Offline
Posts: 548
Join Date: Jan 2006
Location: Solomon Islands
Age: 22
Groans: 74
Groaned at 73 Times in 25 Posts
Thanks: 406
Thanked 566 Times in 145 Posts
Re: Finding the number of zero's in 'Factorial of a number' - 28-01-2007, 11:29 PM

Quote:
Originally Posted by karthick_prabu View Post
Ya i completely agree with you that we need to find the number of 5's in the given factorial number.

but, how did the formula --> round(n/5)+round(n/25)+.... arrive?

btwn, thanks for the info smilingtears.
simple chhe..

I'll tell you with an example..

If you want to know how many fives are there in 26!
By convention,you'll go about finding how many fives you have..so you'll divide by 5 n u'll get 5 as the answer..but in reality it has 6 fives.. one from 25 which is equal to 5*5..
Dividing by 5 once will give you the multiples of 5..So,you'll have to divide by 5 again to count for this extra five..

better way to do it is..

find n/5.Now,see if Quotient is greater than 5,if it is..divide it again by 5 n continue till you get a quotient less than 5. It's better than dividing by 25,125(5*5*5) n so on..

Example for 26! as taken above:
no of 5s= 26/5=5(q)+1(r)
discard r=1 n divide 5 by 5 again..you'll get 1..
so answer is 5+1=6

You can use it to find no. of any digit in a factorial
say you want to find number of 2s in 43!

no. of 2s= 43/2=20(q)
since 20> 2 therefore divide again by 2..
so u'll have the series like
20+10+5+2+1
38 twos





Last edited by smilingtears; 30-01-2007 at 05:52 AM.
  Send a message via Yahoo to smilingtears  
Reply With Quote
The Following 6 Users Say Thank You to smilingtears For This Useful Post:
bindlishsonia (20-04-2007), karthick_prabu (29-01-2007), mohit_353 (02-02-2007), nadmaddies (28-06-2007), niravj (01-10-2007), poojagopalani (21-06-2007)
Re: Finding the number of zero's in 'Factorial of a number'
Old
  (#5)
karthick_prabu
has no status.
Newbie PaGaL
 
karthick_prabu's Avatar
 
Status: Offline
Posts: 5
Join Date: Jan 2007
Location: Chennai
Age: 23
Groans: 0
Groaned at 0 Times in 0 Posts
Thanks: 1
Thanked 8 Times in 2 Posts
Re: Finding the number of zero's in 'Factorial of a number' - 29-01-2007, 01:24 AM

WOW! amazing explanation.

thanks a lot.
   
Reply With Quote
The Following User Says Thank You to karthick_prabu For This Useful Post:
mohit_353 (02-02-2007)
Re: Finding the number of zero's in 'Factorial of a number'
Old
  (#6)
Krack_CAT
has no status.
Expert PaGaL
 
Krack_CAT's Avatar
 
Status: Offline
Posts: 175
Join Date: Feb 2006
Location: India
Age: 27
Groans: 2
Groaned at 11 Times in 7 Posts
Thanks: 1
Thanked 267 Times in 17 Posts
Re: Finding the number of zero's in 'Factorial of a number' - 29-01-2007, 11:14 AM

Quote:
Originally Posted by smilingtears View Post
simple chhe..

I'll tell you with an example..

If you want to know how many fives are there in 26!
By convention,you'll go about finding how many fives you have..so you'll divide by 5 n u'll get 5 as the answer..but in reality it has 6 fives.. one from 25 which is equal to 5*5..
Dividing by 5 once will give you the multiples of 5..So,you'll have to divide by 5 again to count for this extra five..

better way to do it is..

find n/5.Now,see if Quotient is greater than 5,if it is..divide it again by 5 n continue till you get a quotient less than 5. It's better than dividing by 25,125(5*5*5) n so on..

Example for 26! as taken above:
no of 5s= 26/5=5(q)+1(r)
discard r=1 n divide 5 by 5 again..you'll get 1..
so answer is 5+1=6

You can use it to find no. of any digit in a factorial
say you want to find number of 2s in 43!

no. of 2s= 43/2=20(q)
since 20> 2 therefore divide again by 2..
so u'll have the series like
20+10+5+2+1
38 twos
small error on my part..sorry for da useless post


Living on a Prayer................................

Last edited by Krack_CAT; 29-01-2007 at 11:18 AM.
  Send a message via Yahoo to Krack_CAT  
Reply With Quote
Re: Finding the number of zero's in 'Factorial of a number'
Old
  (#7)
Krack_CAT
has no status.
Expert PaGaL
 
Krack_CAT's Avatar
 
Status: Offline
Posts: 175
Join Date: Feb 2006
Location: India
Age: 27
Groans: 2
Groaned at 11 Times in 7 Posts
Thanks: 1
Thanked 267 Times in 17 Posts
Re: Finding the number of zero's in 'Factorial of a number' - 29-01-2007, 11:16 AM

Quote:
Originally Posted by karthick_prabu View Post


Example2 : find the number of zero's in 130! ??

Usage : In this case n = 130.

-> round(130/5) + round(130/25) + round(130/125) ....

->round(36) + round(5) + round(1)

-> 42 (42 zeroes in 130!)
small mistake here:
it shd be 26 + 5 + 1
=>32 zeroes in 130!


Living on a Prayer................................
  Send a message via Yahoo to Krack_CAT  
Reply With Quote
Re: Finding the number of zero's in 'Factorial of a number'
Old
  (#8)
anarchy
Puzzled about PGs resemblance to Facebook :P
Certified PaGaL
 
anarchy's Avatar
 
Status: Offline
Posts: 1,888
Join Date: Nov 2005
Location: Kozhikode
Age: 24
Groans: 251
Groaned at 118 Times in 60 Posts
Thanks: 4,716
Thanked 3,387 Times in 906 Posts
Re: Finding the number of zero's in 'Factorial of a number' - 29-01-2007, 05:39 PM

Quote:
Originally Posted by Krack_CAT View Post
small mistake here:
it shd be 26 + 5 + 1
=>32 zeroes in 130!
now that the individual query has been done and explained well by Sunila aka smilingtears, can we please close this thread???


People Bell it, I Killed it

IIM K Backwaters <click here>

My Blog
   
Reply With Quote
Re: Finding the number of zero's in 'Factorial of a number'
Old
  (#9)
karthick_prabu
has no status.
Newbie PaGaL
 
karthick_prabu's Avatar
 
Status: Offline
Posts: 5
Join Date: Jan 2007
Location: Chennai
Age: 23
Groans: 0
Groaned at 0 Times in 0 Posts
Thanks: 1
Thanked 8 Times in 2 Posts
Re: Finding the number of zero's in 'Factorial of a number' - 29-01-2007, 10:17 PM

Sure.

This thread can be closed..
   
Reply With Quote
Re: Finding the number of zero's in 'Factorial of a number'
Old
  (#10)
prashant_setia
has no status.
Newbie PaGaL
 
Status: Offline
Posts: 7
Join Date: Feb 2007
Location: chandigarh
Groans: 0
Groaned at 0 Times in 0 Posts
Thanks: 1
Thanked 0 Times in 0 Posts
Re: Finding the number of zero's in 'Factorial of a number' - 19-02-2007, 11:01 AM

Quote:
Originally Posted by karthick_prabu View Post
Sure.

This thread can be closed..
Can nybody plz tell me to find no. of zeros in 36!^36!
thanx plz
   
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

» Sponsors








PaGaLGuY.com is not responsible for the views and opinions of the posters.
PaGaLGuY.com is an Inzane Labs Private Limited production.
Hosted on servers powered by Neutral Web