Computing end-digits of large factorials

PhDorBust
Messages
141
Reaction score
0
The factorial of 1 trillion ends in many trailing zeros. Find the five digits that comes before the trailing zeros.

I know how to calculate the number of trailing zeros, but don't know what to do afterwards. This is a computational problem.
 
Physics news on Phys.org
PhDorBust said:
The factorial of 1 trillion ends in many trailing zeros. Find the five digits that comes before the trailing zeros.

I know how to calculate the number of trailing zeros, but don't know what to do afterwards. This is a computational problem.

One trillion could be either 10^12 or 10^18, depending on where you reside. Which one do you mean? See http://en.wikipedia.org/wiki/Trillion .

RGV
 
10^12, sorry.

Should it make a difference though?
 
PhDorBust said:
10^12, sorry.

Should it make a difference though?

It will make a huge difference. But, it may not make a difference in the final 5 non-zero digits.

Do you know how many trailing zeros there are in (1012)! ?
 
Last edited:
Let a = 10^12, b = n be largest n such that a/5^n is an integer.

Number of trailing zeros will be N = a/5 + a/(5^2) + a/(5^3) + ... a/(5^n) = a/(5^n) * (1 + 5 + 5^2 + ... + 5^(n-1) ) = a/(5^n) * [ 5^n - 1] / [5 - 1].

But (10^12)! / 10^N is still pretty damn large to calculate. I don't see the next step.
 
Prove $$\int\limits_0^{\sqrt2/4}\frac{1}{\sqrt{x-x^2}}\arcsin\sqrt{\frac{(x-1)\left(x-1+x\sqrt{9-16x}\right)}{1-2x}} \, \mathrm dx = \frac{\pi^2}{8}.$$ Let $$I = \int\limits_0^{\sqrt 2 / 4}\frac{1}{\sqrt{x-x^2}}\arcsin\sqrt{\frac{(x-1)\left(x-1+x\sqrt{9-16x}\right)}{1-2x}} \, \mathrm dx. \tag{1}$$ The representation integral of ##\arcsin## is $$\arcsin u = \int\limits_{0}^{1} \frac{\mathrm dt}{\sqrt{1-t^2}}, \qquad 0 \leqslant u \leqslant 1.$$ Plugging identity above into ##(1)## with ##u...
Back
Top