2019 AMC 12A Problem 24

Below is the professionally curated solution for Problem 24 of the 2019 AMC 12A, from LIVE by Po-Shen Loh. You can also try the full timed exam, view all 2019 AMC 12A solutions, or check the answer key.

All of the real AMC 8, AMC 10, AMC 12, and AIME problems in our complete solution collection are used with official legal permission of the Mathematical Association of America (MAA).

Concepts:Legendre’s Formulaprimedigits

Difficulty rating: 2420

24.

For how many integers nn between 11 and 50,50, inclusive, is (n21)!(n!)n \dfrac{(n^2 - 1)!}{(n!)^n} an integer? (Recall that 0!=1.0! = 1.)

3131

3232

3333

3434

3535

Solution:

For a prime p,p, the condition to be an integer reduces (via Legendre's formula) to nsp(n)sp(n21)+1,n \cdot s_p(n) \ge s_p(n^2 - 1) + 1, where sps_p is the base-pp digit sum. This can fail only when sp(n)=1,s_p(n) = 1, i.e. n=pan = p^a is a prime power.

For n=pa,n = p^a, the requirement becomes pa12a(p1).p^a - 1 \ge 2a(p - 1). Checking prime powers up to 50,50, this fails exactly for every prime nn and for n=4.n = 4.

There are 1515 primes at most 50,50, plus n=4,n = 4, giving 1616 failures. Hence 5016=3450 - 16 = 34 values of nn work.

Thus, the correct answer is D.

Problem 24 in Other Years