Page 1 of 1

1000!

Posted: Wed Oct 31, 2007 12:35 am UTC
I'm going to assume many of you know this, but I still find it fun to ask.

How many zeros are at the end of 1000! (1000 factorial)

Re: 1000!

Posted: Wed Oct 31, 2007 12:57 am UTC
111?

Re: 1000!

Posted: Wed Oct 31, 2007 12:58 am UTC
none, but there's 3 in the middle

Re: 1000!

Posted: Wed Oct 31, 2007 1:00 am UTC
The number of ending zeros will be the same as the number of times 5 divides 1000! (There will be more than enough 2s to pair up with the 5s to make 10s)

Thinking of 1000! as a product of 1000 factors...

5 divides 200 of the factors,
52 divides 40 of them,
53 divides 8 of them,
54 divides 1 of them,
for a total of 249.

Re: 1000!

Posted: Wed Oct 31, 2007 1:08 am UTC

Re: 1000!

Posted: Wed Oct 31, 2007 1:14 am UTC
I don't know, let's count!

4023872600770937735437024339230039857193748642107146325437999104299385\
1239862902059204420848696940480047998861019719605863166687299480855890\
1323829669944590997424504087073759918823627727188732519779505950995276\
1208749754624970436014182780946464962910563938874378864873371191810458\
2578364784997701247663288983595573543251318532395846307555740911426241\
7474349347553428646576611667797396668820291207379143853719588249808126\
8678383745597317461360853795345242215865932019280908782973084313928444\
0328123155861103697680135730421616874760967587134831202547858932076716\
9132448426236131412508780208000261683151027341827977704784635868170164\
3650241536913982812648102130927612448963599287051149649754199093422215\
6683257208082133318611681155361583654698404670897560290095053761647584\
7728421889679646244945160765353408198901385442487984959953319101723355\
5566021394503997362807501378376153071277619268490343526252000158885351\
4733161170210396817592151090778801939317811419454525722386554146106289\
2187960223838971476088506276862967146674697562911234082439208160153780\
8898939645182632436716167621791689097799119037540312746222899880051954\
4441428201218736174599264295658174662830295557029902432415318161721046\
5832036786906117260158783520751516284225540265170483304226143974286933\
0616908979684825901254583271682264580665267699586526822728070757813918\
5817888965220816434834482599326604336766017699961283186078838615027946\
5955131156552036093988180612138558600301435694527224206344631797460594\
6825731037900840244324384656572450144028218852524709351906209290231364\
9327349756551395872055965422874977401141334696271542284586237738753823\
0483865688976461927383814900140767310446640259899490222221765904339901\
8860185665264850617997023561938970178600408118897299183110211712298459\
0164192106888438712185564612496079872290851929681937238864261483965738\
2291123125024186649353143970137428531926649875337218940694281434118520\
1580141233448280150513996942901534830776445690990731524332782882698646\
0278986432113908350621709500259738986355427719674282224875758676575234\
4220207573630569498825087968928162753848863396909959826280956121450994\
8717012445164612603790293091208890869420285106401821543994571568059418\
7274899809425474217358240106367740459574178516082923013535808184009699\
6372524230560855903700624271243416909004153690105933983835777939410970\
0277534720000000000000000000000000000000000000000000000000000000000000\
0000000000000000000000000000000000000000000000000000000000000000000000\
0000000000000000000000000000000000000000000000000000000000000000000000\
000000000000000000000000000000000000000000000000

That number is much smaller than I'd have thought...

Re: 1000!

Posted: Wed Oct 31, 2007 2:51 am UTC
Numerology time!

1000 in base 5 is 13000. The sum of the digits is 4. Subtract that from the original number and get 12441. Divide by 4, and we have 1444, which, in base 10, is 249, which is the answer we want.

Re: 1000!

Posted: Wed Oct 31, 2007 3:08 am UTC
antonfire confused me - I don't want to even know what he was doing with numerology.
Answer is 249 for reasons listed - that website is really good at explaining it.

LoopQuantumGravity - where were you able to multiply that out and get all the numbers. btw - my first guess before I looked into it was that it was well over 1000 zeros. I think I may have gotten excited and said 1,000,000 XD

Re: 1000!

Posted: Wed Oct 31, 2007 3:38 am UTC
Gyvulys624 wrote:antonfire confused me - I don't want to even know what he was doing with numerology.
Answer is 249 for reasons listed - that website is really good at explaining it.

LoopQuantumGravity - where were you able to multiply that out and get all the numbers. btw - my first guess before I looked into it was that it was well over 1000 zeros. I think I may have gotten excited and said 1,000,000 XD

I used mathematica to do it for me. It's only a few thousand digits. 1000! ~ 4.02*10^2567.

Re: 1000!

Posted: Wed Oct 31, 2007 1:08 pm UTC
LoopQuantumGravity wrote:
Gyvulys624 wrote:antonfire confused me - I don't want to even know what he was doing with numerology.
Answer is 249 for reasons listed - that website is really good at explaining it.

LoopQuantumGravity - where were you able to multiply that out and get all the numbers. btw - my first guess before I looked into it was that it was well over 1000 zeros. I think I may have gotten excited and said 1,000,000 XD

I used mathematica to do it for me. It's only a few thousand digits. 1000! ~ 4.02*10^2567.

Yeah x! grows slower than most mathematicians intuitively feel it should, I've often found people trying to come up with crazy algorithms to try and reduce the size of the number they're dealing with when they have x!, this often just isn't needed.

Re: 1000!

Posted: Wed Oct 31, 2007 1:27 pm UTC
Dividing by four gives a good estimate since x/5+x/25+x/125...~=x/4

Re: 1000!

Posted: Wed Oct 31, 2007 3:48 pm UTC
Macbi wrote:Dividing by four gives a good estimate since x/5+x/25+x/125...~=x/4

Using the floor of each of those fractions is the method I was taught in number theory. 1037! factorial has 207 + 41 + 8 + 1 = 257 terminal zeroes.

Re: 1000!

Posted: Wed Oct 31, 2007 4:50 pm UTC
Macbi wrote:Dividing by four gives a good estimate since x/5+x/25+x/125...~=x/4

Subtracting the sum of the digits in base 5 before dividing gives an even better estimate. In fact, it gives the correct answer. See if you can work out why this is true.

Re: 1000!

Posted: Thu Nov 01, 2007 10:13 pm UTC
I can see why subtracting the base 5 digital sum first would give you the exact value, but I don't have anything written down. What is obvious is that you will get a multiple of 4 when you subtract the base 5 digital sum from the number, just like you get a multiple of 9 when you subtract the decimal digital sum from the number. So when you divide by 4 after doing that, you never get a fraction.

On a related note, if you count the number of zeros at the end of 36015!, IT'S OVER NINE-THOUSAND!!1!one!!!!11! (it's 9001)