TAOCP 1.2.5 Exercise 3

Since \log_{10}(1000!

Section 1.2.5: Permutations and Factorials

Exercise 3. [**] [10] What permutations of ${1,2,3,4,5}$ would be constructed from the permutation $3,1,2,4$ using Methods 1 and 2, respectively?

x 4. [13] Given the fact that $\log_{10} 1000! = 2567.60464\ldots$, determine exactly how many decimal digits are present in the number $1000!$. What is the most significant digit? What is the least significant digit?

Verified: yes
Solve time: 3m40s


Since

$$ \log_{10}(1000!)=2567.60464\ldots, $$

we have

$$ 10^{2567}<1000!<10^{2568}. $$

Any positive integer $N$ satisfying $10^{m}\le N<10^{m+1}$ has exactly $m+1$ decimal digits. Therefore $1000!$ has exactly

$$ 2567+1=2568 $$

decimal digits.

The most significant digit is determined from the fractional part:

$$ 1000!=10^{2567.60464\ldots} =10^{2567}\cdot 10^{0.60464\ldots}. $$

Since

$$ 10^{0.60464\ldots}=4.02418\ldots, $$

the decimal expansion of $1000!$ begins with the digit $4$.

For the least significant digit, the factorization

$$ 1000!=1\cdot2\cdot3\cdots1000 $$

contains many factors $2$ and $5$, hence at least one factor $10$. Therefore the units digit is $0$.

Thus the number of decimal digits, the most significant digit, and the least significant digit are

$$ \boxed{2568,\ 4,\ 0}. $$