Computing end-digits of large factorials

Click For Summary

Homework Help Overview

The discussion revolves around determining the five digits that precede the trailing zeros in the factorial of one trillion (10^12). Participants are exploring the computational challenges associated with this problem, particularly in relation to the number of trailing zeros.

Discussion Character

  • Exploratory, Assumption checking, Mathematical reasoning

Approaches and Questions Raised

  • Participants discuss the calculation of trailing zeros in factorials and express uncertainty about the subsequent steps needed to find the desired digits. There is also a clarification regarding the definition of one trillion, which could refer to either 10^12 or 10^18.

Discussion Status

The conversation is ongoing, with participants questioning the implications of the different interpretations of one trillion and the impact on the final digits. Some have provided mathematical expressions related to calculating trailing zeros, but there is no consensus on how to proceed from there.

Contextual Notes

There is a focus on the computational complexity of calculating large factorials, particularly in relation to the number of trailing zeros and the size of the resulting numbers. Participants are navigating the assumptions about the value of one trillion and its effect on the problem.

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.
 

Similar threads

Replies
1
Views
1K
  • · Replies 11 ·
Replies
11
Views
2K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
Replies
32
Views
4K
Replies
4
Views
1K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 17 ·
Replies
17
Views
3K
  • · Replies 5 ·
Replies
5
Views
4K