2020 AMC 10A Problem 11
What is the median of the following list of numbers
Show solution without answering
Key insight
With 4040 numbers the median is halfway between the 2020th and 2021st. The squares 1, 4, ..., 1936 (44 of them) squeeze in below, pushing the middle down by 44.
Solution
There are numbers, an even count, so the median is the average of the th and st smallest. The job is to find those two numbers.
- Without the squares. The list alone would have as its th number.
- The squares that get in the way. Some squares are small and slip in among the numbers below . Which ones? and . So the squares are all at most : that is small squares. Every other square is at least .
- Count up to a number between and . The numbers in the list that are at most are the ordinary numbers (that is of them) plus the small squares. That is numbers.
- We want this count to be : gives . So exactly numbers are at most , and the biggest of them is . That makes the th number.
- The next number is . It is not a square, so it appears only once, and it is the st.
- The median is .
The answer is .
Why this works
To find the number in a given position of a sorted list, count how many entries are at or below a guess, and adjust the guess until the count is right. Here the small squares crowd in at the bottom, so everything moves places down compared with the plain list to .
Concise solution
A shorter write-up, the way contest solutions are usually written. It may take a different route from the solution above.
With entries, the median is the average of the th and st smallest.
For an integer , the entries that are at most are the integers together with the perfect squares up to , namely of them. Since , for this count is .
We want , so . Thus exactly entries are , and the th smallest entry is itself. The next entry is (not a square, so it appears once), which is the st.
Median .
The answer is .
Review in the AoPS books
- Prealgebra, Chapter 13: Data and Statistics
- Introduction to Number Theory, Chapter 1: Integers: The Basics
- Introduction to Algebra, Chapter 20: Special Functions (§20.3)
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.