You are not logged in.
So i am encounter with the question of:
How many 0s are there at the end of the # that is the product of the first 150 POSITIVE intergers (i.e. 1,2,3,.....150)?
anyone know?
or have a method that probably work?
'Cause I don't want to calculate for a week or so
Last edited by iamfriendly (2010-02-14 13:40:15)
EYE AM FRIENDLY, THAT'S O U NEED 2 NO,
psst,
Don't trust strangers, EYE AM FRIENDLY, THAT'S O U NEED 2 NO ..........psst, Don't trust strangers......
Offline
i am guessing about 17?
EYE AM FRIENDLY, THAT'S O U NEED 2 NO,
psst,
Don't trust strangers, EYE AM FRIENDLY, THAT'S O U NEED 2 NO ..........psst, Don't trust strangers......
Offline
20?
EYE AM FRIENDLY, THAT'S O U NEED 2 NO,
psst,
Don't trust strangers, EYE AM FRIENDLY, THAT'S O U NEED 2 NO ..........psst, Don't trust strangers......
Offline
Hi;
That product is called a factorial. The product of the first 10 consecutive positive integers is 1*2*3*4*5*6*7*8*9*10 = 10!
For 150!.
Use this well known method;
Where the bracket denotes the floor function, so there are 37 zeros at the end of 150!
150! = 57133839564458545904789328652610540031895535786011264182548375833179829124845398393126574488675311145377107878746854204162666250198684504466355949195922066574942592095735778929325357290444962472405416790722118445437122269675520 000 000 000 000 000 000 000 000 000 000 000 000
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
Thanks for the help, but why 125, 25, and 5 as denominators?
EYE AM FRIENDLY, THAT'S O U NEED 2 NO,
psst,
Don't trust strangers, EYE AM FRIENDLY, THAT'S O U NEED 2 NO ..........psst, Don't trust strangers......
Offline
Hi;
Since the 10, 100, 1000 ... are what puts the zeros at the end of the factorial and 10 is 5 * 2 and gives 1 zero, 100 is 5*5 *2*2 and gives 2 zeros,
1000 is 5*5*5 *2*2*2 and gives 3 zeros, we only need to find the number of pairs of 5 and 2. Since there will always be as many or
more 2's as 5's, we really only need to find the number of ,5's, 5*5's, 5*5*5's etc.
Also the floor function truncates a number down to an integer,
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
Hey!
I searched floor funtion, so basically it just "round it down to the whole number" as in my words
Is that somewhat correct?
EYE AM FRIENDLY, THAT'S O U NEED 2 NO,
psst,
Don't trust strangers, EYE AM FRIENDLY, THAT'S O U NEED 2 NO ..........psst, Don't trust strangers......
Offline
I think i get it, thanks again for your attention and time, and i presume this will work on fractorial? what is this formula called?
EYE AM FRIENDLY, THAT'S O U NEED 2 NO,
psst,
Don't trust strangers, EYE AM FRIENDLY, THAT'S O U NEED 2 NO ..........psst, Don't trust strangers......
Offline
Hi;
The process of taking the product of the first n consecutive integers is called n factorial.
It is written as n!
1*2*3*4 is called 4 factorial or 4! = 24
1*2*3*4**6 is called 6 factorial or 6! = 720
That technique will always work on any factorial.
Here is one for you, how many zeros are on the end of 10000! ? If you can do this then you understand. Try it, when you get an answer of 2499 then you are there.
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
I got it it's 2499! 10000! = [10000/3125]+[10000/625]+[10000/125]+[10000/25]+[10000/5]=a number with 2499 0s
Thank you
EYE AM FRIENDLY, THAT'S O U NEED 2 NO,
psst,
Don't trust strangers, EYE AM FRIENDLY, THAT'S O U NEED 2 NO ..........psst, Don't trust strangers......
Offline
Hi;
That's it. A number with 2499 zeros at the end of it.
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