AMC 10 Step by Step

2019 AMC 10A Problem 9

P1-10~3 minPrint

What is the greatest three-digit positive integer nn for which the sum of the first nn positive integers is not‾\underline{\text{not}} a divisor of the product of the first nn positive integers?

Log in to save your progress.
Show solution without answering

Key insight

Dividing n! by n(n+1)/2 leaves 2 times (n-1)! over n+1. This fails to be whole only when n+1 is a prime, and the largest prime below 1000 is 997.

Solution

The sum of the first nn positive integers is n(n+1)2\frac{n(n+1)}{2}, and their product is n!=1⋅2⋯nn! = 1 \cdot 2 \cdots n.

1. Look at a small case first. Take n=4n = 4: the sum is 1010 and the product is 2424. 1010 does not divide 2424. Now n=5n = 5: the sum is 1515 and the product is 120=15⋅8120 = 15 \cdot 8. It divides.
2. Divide in general. Write n!=n⋅(n−1)!n! = n \cdot (n-1)!. Then
n!  n(n+1)/2  =2⋅n⋅(n−1)!n(n+1)=2⋅(n−1)!n+1.\frac{n!}{\;n(n+1)/2\;} = \frac{2 \cdot n \cdot (n-1)!}{n(n+1)} = \frac{2 \cdot (n-1)!}{n+1}.
So the question is whether n+1n + 1 divides 2⋅(n−1)!2 \cdot (n-1)!, that is, 2⋅1⋅2⋯(n−1)2 \cdot 1 \cdot 2 \cdots (n-1).
3. When n+1n + 1 is a prime (bigger than 22): a prime divides a product only if it divides one of the factors. Every factor here is smaller than n+1n + 1, so none of them is a multiple of it. The sum is not a divisor. (In step 1, n+1=5n + 1 = 5 is prime.)
4. When n+1n + 1 is not prime, it splits into smaller factors that all show up among 1,2,…,n−11, 2, \ldots, n-1 (with plenty of room when nn is this large). So the sum is a divisor.
5. Search from the top. We want the largest three-digit nn with n+1n + 1 prime.
- n=999n = 999: n+1=1000n + 1 = 1000, not prime.
- n=998n = 998: n+1=999=27⋅37n + 1 = 999 = 27 \cdot 37, not prime.
- n=997n = 997: n+1=998=2⋅499n + 1 = 998 = 2 \cdot 499, not prime.
- n=996n = 996: n+1=997n + 1 = 997. Try every prime up to 3131 (since 322=1024>99732^2 = 1024 > 997): none divides 997997. So 997997 is prime.

The largest such nn is 996996.

The answer is (B) 996\boxed{\textbf{(B)}\ 996}.

Why this works

Simplifying the fraction first turned a question about two big formulas into "does n+1n + 1 divide a product of smaller numbers?" A prime can never divide a product of numbers all smaller than itself, which is exactly why primes are the failures. Cancel what you can before thinking about divisibility.

Concise solution

A shorter write-up, the way contest solutions are usually written. It may take a different route from the solution above.

The sum is n(n+1)2\frac{n(n+1)}{2} and the product is n!n!. Their quotient is
n!n(n+1)/2=2 (n−1)!n+1,\frac{n!}{n(n+1)/2} = \frac{2\,(n-1)!}{n+1},
so the sum divides the product exactly when n+1n + 1 divides 2(n−1)!2(n-1)!.

If n+1n + 1 is a prime p>2p > 2, then pp divides none of the factors 1,2,…,n−11, 2, \dots, n - 1 nor the 22, so pp does not divide 2(n−1)!2(n-1)!: the sum is not a divisor. If n+1n + 1 is composite, its prime factors are all at most (n+1)/2≤n−1(n+1)/2 \le n - 1 and appear (with room to spare) inside 2(n−1)!2(n-1)!, so the sum does divide the product.

So we need the largest three-digit nn with n+1n + 1 prime. Check downward: 10001000, 999=27⋅37999 = 27 \cdot 37, and 998=2⋅499998 = 2 \cdot 499 are composite, while 997997 is prime (it has no prime factor up to 3131). Hence n=996n = 996.

The answer is (B) 996\boxed{\textbf{(B)}\ 996}.

Review in the AoPS books

Similar problems

Problem © Mathematical Association of America (MAA), American Mathematics Competitions. Reproduced for non-commercial educational use. Solution and commentary are original to this site.