Subscribe via feed.

## One trillion factorial

Posted by Chris on July 11, 2010 – 7:09 pm

How many 0s (zeroes) are there at the right hand end of 1,000,000,000,000! ?

Bonus points if you can express one trillion factorial in the form  10^(10^x), where your job is to find x (to a couple of decimal places or so).

That’s an American trillion, which used to be a British billion.

This post is under “MathsChallenge” and has 28 respond so far.
If you enjoy this article, make sure you subscribe to my RSS Feed.

### 28 Responds so far- Add one»

1. 1. Fat Guy Said：

10^(10^x)=1,000,000,000,000

1,000,000,000,000
has 12 zeros.

Therefore,
(10^x) must be equal to 12.

Which makes 10^(12)=1,000,000,000,000.

How do you make (10^x) equal 12?

2. 2. Fat Guy Said：

The closest I’ve got so far is 10^(10^1.0791799999)

3. 3. Fat Guy Said：

Actually it seems that the answer is 10^(10^1.079179999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999…

I was going to try it but my calculator (computer one!) only handles 32 digits.

Seems that it doesn’t matter how many nines you put after the 1.07917

4. 4. Fat Guy Said：

Whoops. Just realised its 1,000,000,000,000 ! <—
Darn.

5. 5. Fat Guy Said：

Would anyone care to join the fun?

6. 6. Fat Guy Said：

10^(10^1.079179….)=999,920,726,245.4864087035649143912

7. 7. Fat Guy Said：

Close enough

8. 8. Chris Said：

@Fat Guy. You’ve only worked with a trillion. I want you to work with a trillion factorial.

Your x should have been nearer to 1.0791812460476248277225056927041, but I would have accepted 1.08 if that’s what I was after.

9. 9. Chris Said：

@Fat Guy, I see you spotted the mistake while I was replying.

To get the x that you’ve been playing with, calculate log 12 (base 10).

@all. I expect you’ll need the Windows calculator for this problem. But you’ll not be able to simply punch in (10^12)!
It struggles with a mere (10^5)! ≈ 2.8242… * 10^456573 ≈ 10^(10^5.65951…)

10. 10. Fat Guy Said：

Half of the calculator functions i don’t know what they do

11. 11. Chris Said：

Check this out: http://en.wikipedia.org/wiki/Logarithm
The Windows calculator can do logarithms to base e (ln button) and base 10 (log button).
It also does e^x using x INV ln and 10^x using x INV log. But I tend to do the latter with 10 x^y y. Sorry, that’s a bit cryptic.

12. 12. Chris Said：

If I haven’t goofed, (10^12)! ≈ 10^(10^13)). I’ve deliberately left out the decimal part after the 13.

Whatever, it’s a seriously big number. But it’s not even the smallest drop in the ocean (that’s a major understatment of magnitude that I can’t even begin to describe) compared to: http://en.wikipedia.org/wiki/Graham's_number, which in turn has been dwarfed by yet another number (that I can’t quickly find a link to) that makes Graham’s number a joke. Of course, all these number = 0 after dividing by infinity.

13. 13. Chris Said：

To do the bonus part, you’ll need http://en.wikipedia.org/wiki/Stirling's_approximation
Nearly 5:30 am here. I’ll be back tomorrow.

14. 14. Jheri Said：

the answer is x=11. yes, there are 12 zeros. that’s not how you do it.

15. 15. Josh Said：

I don’t know if I am way to off in left field here, being a musician that tends to happen when we thing WAY outside the box, but there would be an infinite amount of zero’s….1,000,000,000,000.0000000000000000000000000000000000000 etc.

I am sure I am just stupid, but that was my thinking ^_^

16. 16. Chris Said：

@Jheri. No, I’ve already indicated that x is a little over 13. There are a lot more than 12 0s at the right of (10^12)!

@Josh. One trillion factorial is finite, so it can’t possibly have an infinite number of anything.

@all. I want you to show how you got your answers. I won’t be happy with your answers if you simply state them and/or use a fancy mathematics program to do it. The Windows calculator, Stirling’s approximation and your brain is all that is required. I haven’t checked to see if a regular calculator is up to the job.

17. 17. Karl Sharman Said：

249,999,999,997 trailing zeros. Thats using specialist software.

I asked someone downstairs and they gave me this answer:-

“10^(10^13.06317213025609) – That is using deMoivre, as I refuse to use anything posed by a fellow of my college who was expelled! Besides, Pinet had to improve on Stirlings work.”

They didn’t give me any proof / working out, so I think they are wrong.

18. 18. slavy Said：

Even though I didn’t use any computer, I believe the number of zeros is a little bit less – 249,999,996,925…

19. 19. Chris Said：

@Karl, I take it that your friend was referring to James Stirling.

Karl’s answers are correct, but he get no points.

As the cat’s out of the proverbial:
http://www.wolframalpha.com/input/?i=%2810%5E12%29%21

Now I want someone to do it the (not so) hard way, as I assume slavy has done.

20. 20. slavy Said：

I agree I make lots of mistakes with numbers – bad computations from my side and your answer is correct!

21. 21. Knightmare Said：

In an old joke, two noblemen vie to name the bigger number. The first, after ruminating for hours, triumphantly announces “Eighty-three!” The second, mightily impressed, replies “You win.”

22. 22. Anonymous Said：

How many 0s (zeroes) are there at the right hand end of 1,000,000,000,000! ?

Given any number the number of zeroes is governed by the number of factors of 5 the number has.
(each factor of 5 must be paired with a factor of 2 to generate a trailing zero as 2×5=10,
for a factorial since every 2nd digit contains at least one factor of 2 , this condition is easily met)

so for a number like
6! we can predict it has only 1 trailing 0, since it has only 1 factor of 5
(6*5*4*3*2*1)=720

similiarly for 11! We can predict it has 2 trailing 0s as only the 5 or 10 will have factors of 5
(11*10*9*8*7*6*5*4*3*2*1)=39,916,800

in n! integer(n/5) digits will have at least 1 factor 5.

but 25 will have 2 factors of 5 (5*5)
so integer(n/25) digits will have at least 2 factors of 5.

but 125 will have 3 factors of 5 (5*5*5)
so integer(n/125) digits will have at least 3 factors of 5.

625 will have 4 factors of 5 (5^4)
so integer(n/625) digits will have at least 4 factors of 5.

etc……..

So to find the number of trailing zeros in n!

trailing zeros = sum( integer(n/5^i)) for i=1 to inf
obviously when 5^i becomes larger than n you can stop as integer( n/ anything larger than n)=0

Try for 1001!
int(1001/5)=200
int(1001/25)=40
int(1001/125)=8
int(1001/625)=1
int(1001/3125)=0 so stop

200+40+8+1=249 trailing zeroes. This can be verified by a math engine program.

Now for 1,000,000,000,000!
int(1000000000000/5)=200000000000
int(1000000000000/25)=40000000000
int(1000000000000/125)=8000000000
int(1000000000000/625)=1600000000
int(1000000000000/3125)=320000000
int(1000000000000/15625)=64000000
int(1000000000000/78125)=12800000
int(1000000000000/390625)=2560000
int(1000000000000/1953125)=512000
int(1000000000000/9765625)=102400
int(1000000000000/48828125)=20480
int(1000000000000/244140625)=4096
int(1000000000000/1220703125)=819
int(1000000000000/6103515625)=163
int(1000000000000/30517578125)=32
int(1000000000000/152587890625)=6
int(1000000000000/762939453125)=1
int(1000000000000/3814697265625)=0 so stop
Sum=249,999,999,997

Cam

23. 23. slavy Said：

My only remark to Cam’s solution is that it is not necessary to do all the intermediate computations, where lazy people like me can use geometric series (and then give a wrong answer ). So we have 2^12(5^11+5^10+5^9+…+5+1)+819+163+32+6+1=2^12(5^12-1)/(5-1)+1021=25*10^10-1024+1021=25*10^10-3, which is the final answer…

24. 24. Chris Said：

Thanks Cam and slavy, that’s what I wanted to see.

25. 25. Chris Said：

I’m even lazier than slavy, I didn’t bother to do the calculations at all this time

26. 26. marc Said：

The number of trailing 0 after N! is slightly less than N/4.

27. 27. marc Said：

Correction :

The number of trailing 0 after N! is approximatively N/4

28. 28. Brandon Stocks Said：

When n is large then n! is approximately 10^k where
k = (n + 1/2)log(n) + 0.39908993 – 0.43429448n

If n is a trillion, n = 10^12, then k is approximately 11.6 trillion. Thus (10^12)! = 10^(1.16*10^13)

So one trillion factorial will has about 11.6 trillion digits to the left of the decimal point, though I dont know how many of those digits are zeros.

1.16 = 10^log(1.16), so 1.16*10^13 = (10^log 1.16)*10^13
= 10^(13 + log 1.16).

So x = 13 + log 1.16

PHP Warning: PHP Startup: Unable to load dynamic library 'C:\Program Files (x86)\Parallels\Plesk\Additional\PleskPHP5\ext\php_mssql.dll' - The specified module could not be found. in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library 'C:\Program Files (x86)\Parallels\Plesk\Additional\PleskPHP5\ext\php_pdo_mssql.dll' - The specified module could not be found. in Unknown on line 0