2020 AMC 10A Problem 17
Define How many integers are there such that ?
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
"" means or . Count the two kinds separately.
1. Where . A product is zero when a factor is zero, so is one of . That is 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 .
- : all factors are negative. is even, so .
- (between and ): the factor is positive and the other are negative. is odd, so .
- (between and ): two factors are positive and are negative. Even, so .
- In general, each time passes a square, one more factor turns positive and the sign flips.
4. So in the gaps between and , between and , between and , and so on: the gap from to for . (Past every factor is positive.)
5. How many whole numbers are in a gap? Strictly between and there are numbers. For example, between and there are (namely ), and between and there are .
6. Add these for :
(The first odd numbers add up to .)
7. Total. .
The answer is .
Why this works
A product of factors like switches sign every time passes one of the 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 "": 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.
exactly when is one of the squares .
For other integers, when an odd number of the factors are negative. If , the negative factors are those with roots above , namely : that is factors. This is odd exactly when is odd. For all factors are negative (even, positive product), and for none are.
So precisely for integers strictly between and with . Each such open gap contains integers, giving
Adding the zeros: .
The answer is .
Review in the AoPS books
- Introduction to Algebra, Chapter 20: Special Functions (§20.2, §20.5)
- Introduction to Number Theory, Chapter 1: Integers: The Basics
- Intermediate Algebra, Chapter 6: Polynomial Division (§6.2, §6.4)
- Prealgebra, Chapter 15: Problem-Solving Strategies (§15.1)
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.