10
$\begingroup$

This is a follow up to First digit of 3^2020

Can you find the first digit of 2020! (factorial) without a computer?

$\endgroup$
8
$\begingroup$

I believe it's

3

Because

We know, that for sufficiently large $n$ we have $n!\approx \sqrt{2\pi n}\ n^n/\exp n$. Applying logarithm, we get $\log n! \approx n\log n - n + \frac12 \log 2\pi n$, or $\log_{10} n! \approx n(\log n - 1)/\log 10+\frac12\log_{10} 2\pi n$. For $n=2020$, we get $\log_{10} 2020!\approx 5801.58667 $. Raising 10 to the power of mantissa (0.58667), we get about 3.861, so the first digit is 3.

Notice

Checking in Python (for example) does show that $2020!$ does indeed start with 3, but nevertheless, the $n!\approx \sqrt{2\pi n}\ n^n/\exp n$ approximate equality must be used with great care, since it says that it will hold for sufficiently large $n$, but in no way does it specify how large must $n$ be to achieve reasonable accuracy. Additionally, numbers may be very close but nevertheless start with different digits, when both are "close" to a digit multiplied by a power of 10 (e.g. 29999 and 30001 are within 0.007% of each other, but start with different digits, both being close to 30000).

$\endgroup$
8
  • 1
    $\begingroup$ We can also use the Stirling given here to bound the error: en.wikipedia.org/wiki/… $\endgroup$
    – sunfishho
    Apr 16 '20 at 6:23
  • $\begingroup$ Ummm... how did you get $\log_{10} 2020 \approx 5799.53491$ "without a computer" (as demanded by the problem)? $\endgroup$ Apr 16 '20 at 6:27
  • 1
    $\begingroup$ @im_so_meta_even_this_acronym Oh, thanks. Actually I forgot about the $\sqrt{2\pi n}$ factor, but fortunately it starts with a 1. $\endgroup$
    – trolley813
    Apr 16 '20 at 6:27
  • 1
    $\begingroup$ @DavidG.Stork Well, it can be calculated either with a simple calculator (even with one which does only +-*/, because logarithms can be computed by summing series). Alternate way is to use a table of logarithms and calculate it by hand (since the numbers involved are not too large). $\endgroup$
    – trolley813
    Apr 16 '20 at 6:29
  • 2
    $\begingroup$ @im_so_meta_even_this_acronym Thanks! I've updated my answer with account to $\sqrt{2\pi n}$ factor, it did not change significantly but became closer. $\endgroup$
    – trolley813
    Apr 16 '20 at 6:39
3
$\begingroup$

$3$

Because:

$\ln 2020!=\sum_\limits{k=2}^{2020} \ln k \approx13358.65$.

$e^{13358.65}\approx 3.8724041499\times10^{5801}$.

$\endgroup$
4

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.