AMC 10 Step by Step

2020 AMC 10A Problem 17

P16-20~6 minPrint

Define P(x)=(x−12)(x−22)⋯(x−1002).P(x) =(x-1^2)(x-2^2)\cdots(x-100^2). How many integers nn are there such that P(n)≤0P(n)\leq 0 ?

Log in to save your progress.
Show solution without answering

Key insight

P(n) is zero at the 100 squares. Between squares its sign flips each time, so it is negative in every other gap, starting with the gap from 1 to 4.

Solution

"P(n)≤0P(n) \le 0" means P(n)=0P(n) = 0 or P(n)<0P(n) < 0. Count the two kinds separately.

1. Where P(n)=0P(n) = 0. A product is zero when a factor is zero, so nn is one of 12,22,…,10021^2, 2^2, \ldots, 100^2. That is 100100 numbers.
2. The sign of a product. A product of nonzero numbers is negative when it has an odd number of negative factors.
3. Try some values of nn.
- n=0n = 0: all 100100 factors are negative. 100100 is even, so P(0)>0P(0) > 0.
- n=2n = 2 (between 11 and 44): the factor n−1n - 1 is positive and the other 9999 are negative. 9999 is odd, so P(2)<0P(2) < 0.
- n=5n = 5 (between 44 and 99): two factors are positive and 9898 are negative. Even, so P(5)>0P(5) > 0.
- In general, each time nn passes a square, one more factor turns positive and the sign flips.
4. So P(n)<0P(n) < 0 in the gaps between 11 and 44, between 99 and 1616, between 2525 and 3636, and so on: the gap from k2k^2 to (k+1)2(k+1)^2 for k=1,3,5,…,99k = 1, 3, 5, \ldots, 99. (Past 1002100^2 every factor is positive.)
5. How many whole numbers are in a gap? Strictly between k2k^2 and (k+1)2(k+1)^2 there are (k+1)2−k2−1=2k(k+1)^2 - k^2 - 1 = 2k numbers. For example, between 11 and 44 there are 22 (namely 2,32, 3), and between 99 and 1616 there are 66.
6. Add these for k=1,3,5,…,99k = 1, 3, 5, \ldots, 99:
2+6+10+⋯+198=2(1+3+5+⋯+99)=2×502=5000.2 + 6 + 10 + \cdots + 198 = 2(1 + 3 + 5 + \cdots + 99) = 2 \times 50^2 = 5000.
(The first 5050 odd numbers add up to 50250^2.)
7. Total. 5000+100=51005000 + 100 = 5100.

The answer is (E) 5100\boxed{\textbf{(E)}\ 5100}.

Why this works

A product of factors like (x−r)(x - r) switches sign every time xx passes one of the rr values. So the signs alternate from gap to gap, and you only need to find the sign in one gap to know them all. Watch for "≤\le": the zeros count too.

Concise solution

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

P(n)=0P(n) = 0 exactly when nn is one of the 100100 squares 12,22,…,10021^2, 2^2, \dots, 100^2.

For other integers, P(n)<0P(n) < 0 when an odd number of the factors n−k2n - k^2 are negative. If k2<n<(k+1)2k^2 < n < (k+1)^2, the negative factors are those with roots above nn, namely (k+1)2,…,1002(k+1)^2, \dots, 100^2: that is 100−k100 - k factors. This is odd exactly when kk is odd. For n<1n < 1 all 100100 factors are negative (even, positive product), and for n>1002n > 100^2 none are.

So P(n)<0P(n) < 0 precisely for integers strictly between k2k^2 and (k+1)2(k+1)^2 with k∈{1,3,5,…,99}k \in \{1, 3, 5, \dots, 99\}. Each such open gap contains (k+1)2−k2−1=2k(k+1)^2 - k^2 - 1 = 2k integers, giving
∑k odd, 1≤k≤992k=2(1+3+⋯+99)=2⋅502=5000.\sum_{k \text{ odd},\ 1 \le k \le 99} 2k = 2(1 + 3 + \cdots + 99) = 2 \cdot 50^2 = 5000.

Adding the 100100 zeros: 5000+100=51005000 + 100 = 5100.

The answer is (E) 5100\boxed{\textbf{(E)}\ 5100}.

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.