Maths Olympiad Prep

Library / /443 of 740

, 2014

Number theory Difficulty 5.0 AIME, harder Find the answer United States

Problem:

Let MM denote the number of positive integers which divide 2014!2014!, and let NN be the integer closest to ln(M)\ln (M). Estimate the value of NN. If your answer is a positive integer AA, your score on this problem will be the larger of 00 and 2018AN\left\lfloor 20-\frac{1}{8}|A-N|\right\rfloor. Otherwise, your score will be zero.

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

Solution

Solution:

Answer: 439 Combining Legendre's Formula and the standard prime approximations, the answer is
p(1+2014sp(2014)p1) \prod_{p}\left(1+\frac{2014-s_{p}(2014)}{p-1}\right)
where sp(n)s_{p}(n) denotes the sum of the base pp-digits of nn.

Estimate ln10008\ln 1000 \approx 8, and ln20149\ln 2014 \approx 9. Using the Prime Number Theorem or otherwise, one might estimate about 150150 primes less than 10071007 and 100100 primes between 10081008 and 20142014. Each prime between 10081008 and 20142014 contributes exactly ln2\ln 2. For the other 150150 primes we estimate ln2014/p\ln 2014 / p as their contribution, which gives p<1000(ln2014lnp)\sum_{p<1000}(\ln 2014-\ln p). Estimating the average lnp\ln p for p<1000p<1000 to be ln100017\ln 1000-1 \approx 7 (i.e. an average prime less than 10001000 might be around 1000/e1000 / e ), this becomes 1502=300150 \cdot 2=300. So these wildly vague estimates give 300+150ln2400300+150 \ln 2 \approx 400, which is not far from the actual answer.

The following program in Common Lisp then gives the precise answer of 438.50943438.50943.

```
;;;; First, generate a list of all the primes
(defconstant +MAXP+ 2500)
(defun is-prime (p)
(loop for k from 2 to (isqrt p) never (zerop (mod p k))))
(defparameter primes (loop for p from 2 to +MAXP+
if (is-prime p) collect p))
;;;; Define NT functions
```
```
(defconstant +MAXDIGITS+ 15)
(defun base-p-digit (p i n)
(mod (truncate n (expt p i)) p))
(defun sum-base-p-digit (p n)
(loop for i from 0 to +MAXDIGITS+ sum (base-p-digit p i n)))
(defun vp-n-factorial (p n)
(/ (- n (sum-base-p-digit p n)) (1- p)))
;;;; Compute product
(princ (loop for p in primes
sum (log (1+ (vp-n-factorial p 2014)))))
```

Want a route through all this instead of an archive? The track puts 2,000 problems in a working order, from AMC 10 level to the IMO shortlist.

Source: MathNet, licensed CC-BY-4.0. Statement reproduced verbatim; metadata (topic, difficulty) added by this project.