Maths Olympiad Prep

Track / Stage 6 / 336 of 400 #1336 of 1964

Problem 1336

National Olympiad, first round
Number theory Difficulty 6.6 Find the answer

Compute the number of digits is 2015!2015!. Your score will be given by max⁡{⌊125(min⁡{AC,CA}−15)⌋,0}\max\{\lfloor125(\min\{\tfrac{A}{C},\tfrac{C}{A}\}-\tfrac{1}{5})\rfloor,0\}, where AA is your answer and CC is the actual answer.

A number or a short expression. Fractions can be typed as 3/2, and spacing doesn't matter.

Next problem →

Official solution

To find the number of digits in 2015!2015!, we use the formula for the number of digits of a factorial, which is given by:

Number of digits of n!=⌊log⁡10(n!)⌋+1 \text{Number of digits of } n! = \left\lfloor \log_{10}(n!) \right\rfloor + 1

Using Stirling's approximation for n!n!:

n!≈2πn(ne)n n! \approx \sqrt{2 \pi n} \left(\frac{n}{e}\right)^n

Taking the logarithm base 10 of both sides:

log⁡10(n!)≈log⁡10(2πn)+log⁡10((ne)n) \log_{10}(n!) \approx \log_{10}(\sqrt{2 \pi n}) + \log_{10}\left(\left(\frac{n}{e}\right)^n\right)

log⁡10(n!)≈log⁡10(2πn)+nlog⁡10(ne) \log_{10}(n!) \approx \log_{10}(\sqrt{2 \pi n}) + n \log_{10}\left(\frac{n}{e}\right)

log⁡10(n!)≈12log⁡10(2πn)+nlog⁡10(n)−nlog⁡10(e) \log_{10}(n!) \approx \frac{1}{2} \log_{10}(2 \pi n) + n \log_{10}(n) - n \log_{10}(e)

log⁡10(n!)≈12log⁡10(2π)+12log⁡10(n)+nlog⁡10(n)−nlog⁡10(e) \log_{10}(n!) \approx \frac{1}{2} \log_{10}(2 \pi) + \frac{1}{2} \log_{10}(n) + n \log_{10}(n) - n \log_{10}(e)

For n=2015n = 2015:

log⁡10(2015!)≈12log⁡10(2π)+12log⁡10(2015)+2015log⁡10(2015)−2015log⁡10(e) \log_{10}(2015!) \approx \frac{1}{2} \log_{10}(2 \pi) + \frac{1}{2} \log_{10}(2015) + 2015 \log_{10}(2015) - 2015 \log_{10}(e)

Calculating each term separately:

12log⁡10(2π)≈12log⁡10(6.2832)≈12×0.798≈0.399 \frac{1}{2} \log_{10}(2 \pi) \approx \frac{1}{2} \log_{10}(6.2832) \approx \frac{1}{2} \times 0.798 \approx 0.399

12log⁡10(2015)≈12×3.304≈1.652 \frac{1}{2} \log_{10}(2015) \approx \frac{1}{2} \times 3.304 \approx 1.652

2015log⁡10(2015)≈2015×3.304≈6659.36 2015 \log_{10}(2015) \approx 2015 \times 3.304 \approx 6659.36

2015log⁡10(e)≈2015×0.434≈874.51 2015 \log_{10}(e) \approx 2015 \times 0.434 \approx 874.51

Adding these together:

log⁡10(2015!)≈0.399+1.652+6659.36−874.51≈5786.901 \log_{10}(2015!) \approx 0.399 + 1.652 + 6659.36 - 874.51 \approx 5786.901

The number of digits is:

⌊5786.901⌋+1=5786+1=5787 \left\lfloor 5786.901 \right\rfloor + 1 = 5786 + 1 = 5787

The final answer is 5787\boxed{5787}

Source: NuminaMath-1.5, licensed Apache-2.0. Statement reproduced verbatim; metadata (topic, difficulty, ordering) added by this project.