AMC 10 Step by Step

2005 AMC 10B Problem 22

P21-25~6 minPrint

For how many positive integers nn less than or equal to 2424 is n!n! evenly divisible by 1+2+⋯+n?1 + 2 + \cdots + n?

Log in to save your progress.
Show solution without answering

Key insight

After simplifying, the question is whether n + 1 divides 2 times (n - 1) factorial. This fails only when n + 1 is an odd prime: 8 times.

Solution

1. Simplify the sum. 1+2+⋯+n=n(n+1)21 + 2 + \cdots + n = \frac{n(n+1)}{2}. For example, 1+2+3+4=10=4⋅521 + 2 + 3 + 4 = 10 = \frac{4 \cdot 5}{2}.
2. Simplify the division. We want
n!n(n+1)/2=2⋅n!n(n+1).\frac{n!}{n(n+1)/2} = \frac{2 \cdot n!}{n(n+1)}.
Since n!=n⋅(n−1)!n! = n \cdot (n-1)!, the nn cancels, leaving 2⋅(n−1)!n+1\dfrac{2 \cdot (n-1)!}{n+1}. So the question is: does n+1n + 1 divide 2⋅(n−1)!2 \cdot (n-1)!?
3. Try small cases to see a pattern:

nnn+1n+12(n−1)!2(n-1)!Divides?
122yes
232no
344yes
4512no
5648yes
67240no
8910080yes

The failures happen when n+1n + 1 is an odd prime.
4. Why a prime fails. Say n+1n + 1 is an odd prime such as 77. Then (n−1)!=5!(n-1)! = 5! is 1⋅2⋅3⋅4⋅51 \cdot 2 \cdot 3 \cdot 4 \cdot 5, all smaller than 77. A prime cannot be built from smaller factors, so 77 does not divide 2⋅5!2 \cdot 5!.
5. Why everything else works. If n+1n + 1 is not prime, split it into two smaller factors, like 12=3⋅412 = 3 \cdot 4. Both factors are at most n−1n - 1, so both appear in (n−1)!=1⋅2⋯(n−1)(n-1)! = 1 \cdot 2 \cdots (n-1), and their product divides it. If the two factors are the same, as in 9=3⋅39 = 3 \cdot 3, use 33 and 66 instead, both in 1⋅2⋯71 \cdot 2 \cdots 7. The only tiny cases, n+1=2n + 1 = 2 and n+1=4n + 1 = 4, were checked in the table.
6. Count. n+1n + 1 runs from 22 to 2525. The odd primes in that range are 3,5,7,11,13,17,19,233, 5, 7, 11, 13, 17, 19, 23: eight of them. So 88 values of nn fail and 24−8=1624 - 8 = 16 work.

The answer is (C) 16\boxed{\textbf{(C)}\ 16}.

Why this works

Simplify the condition with algebra before testing numbers: here the nn cancels and a cleaner question appears. A factorial contains every number smaller than it, so any number built from smaller factors divides it. Primes are the only numbers that cannot be built that way, so they are the only ones that fail. Counting the few failures is easier than counting the successes.

Concise solution

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

Since 1+2+⋯+n=n(n+1)21 + 2 + \cdots + n = \frac{n(n+1)}{2}, the 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 we need n+1n + 1 to divide 2 (n−1)!2\,(n-1)!.

If n+1n + 1 is an odd prime pp: pp divides neither 22 nor any factor of (n−1)!=(p−2)!(n-1)! = (p-2)!, so the quotient is not an integer. These nn fail.

Otherwise: if n+1=2n + 1 = 2 (n=1n = 1), the quotient is 2⋅0!/2=12 \cdot 0!/2 = 1. If n+1=4n + 1 = 4, the quotient is 2⋅2!/4=12 \cdot 2!/4 = 1. If n+1n + 1 is composite and at least 66, write n+1=abn + 1 = ab with 1<a≤b1 < a \le b; if a<ba < b both appear as separate factors in (n−1)!(n-1)!, and if n+1=a2n + 1 = a^2 with a≥3a \ge 3 then aa and 2a2a both lie in {1,…,n−1}\{1, \dots, n-1\}. Either way n+1n + 1 divides (n−1)!(n-1)!. These nn succeed.

The odd primes up to 2525 are 3,5,7,11,13,17,19,233, 5, 7, 11, 13, 17, 19, 23: eight values of n+1n + 1, hence eight failing nn. The count of successes is 24−8=1624 - 8 = 16.

The answer is (C) 16\boxed{\textbf{(C)}\ 16}.

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.