TAOCP 1.2.5 Exercise 4

Let \[ L=\log_{10}(1000!

Section 1.2.5: Permutations and Factorials

Exercise 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: 7m12s


Solution

Let [ L=\log_{10}(1000!)=2567.60464\ldots. ]

For every positive integer (N), the number of decimal digits of (N) is [ \lfloor \log_{10}N\rfloor+1, ] because [ 10^{d-1}\le N<10^d ] is equivalent to (N) having (d) decimal digits. Hence [ \lfloor L\rfloor=2567, ] so (1000!) has [ 2567+1=2568 ] decimal digits.

To determine the most significant digit, write [ 1000!=10^{2567}10^{0.60464\ldots}. ] The relevant logarithms are [ \log_{10}4=0.6020599913\ldots,\qquad \log_{10}5=0.6989700043\ldots. ] Therefore [ \log_{10}4<0.60464\ldots<\log_{10}5. ] Since (10^x) is increasing, [ 4<10^{0.60464\ldots}<5. ] Thus [ 4\cdot10^{2567}<1000!<5\cdot10^{2567}, ] so the most significant digit is (4). As a numerical check, [ 10^{0.60464}\approx 4.0238, ] which lies in the same interval ((4,5)).

Finally, (1000!) contains the factors (2) and (5), and hence contains the factor (10). Therefore (1000!) is divisible by (10), so its least significant digit is (0).

[ \boxed{\text{(1000!) has (2568) decimal digits, with most significant digit (4) and least significant digit (0).}} ]