2021 AMC 10B Problem 8
Mr. Zhou places all the integers from to into a by grid. He places in the middle square (eighth row and eighth column) and places other numbers one by one clockwise, as shown in part in the diagram below. What is the sum of the greatest number and the least number that appear in the second row from the top? 
Show solution without answering
Key insight
Odd squares sit at the top-right corners of the rings. 169 ends the 13 by 13 ring in row 2, so row 2 holds 157 to 170, plus 210.
Solution
Step 1: learn the pattern from the picture.
- In the diagram, is the center. The numbers and are at the top-right corners of the and squares around . So each odd square finishes a full ring, and it sits in the top-right corner of that ring.
- After , the next number is one step to the right, and then the numbers go down the right side, left along the bottom, up the left side, and right along the top, ending at in the top-right corner.
Step 2: find the ring that ends at .
- The grid has center at row , column . The square around the center uses rows to and columns to .
- So is in its top-right corner: row , column .
- The top side of this ring is the last thing filled, going left to right. It has cells (columns to ), ending at . So it holds in row .
Step 3: fill the outer ring, to .
- goes one step to the right of : row , column .
- to go down the right column to the bottom corner (row ).
- to go left along the bottom row to column .
- to go up column , ending at row . So is in row , and the number just below it, , is in row , column .
- to fill the rest of row .
Step 4: read off row 2.
- From left to right, row is: .
- The least number is and the greatest is . Their sum is .
The answer is .
Why this works
In a square spiral, the odd squares mark the corners where each ring ends. Find the corner nearest to what you want, then count forward or backward from it. Always read the direction of travel from the given picture, since spirals can turn either way.
Concise solution
A shorter write-up, the way contest solutions are usually written. It may take a different route from the solution above.
Read the pattern off the diagram: , and each sit at the top-right corner of the , and block centered at . So every odd square finishes its layer at the top-right corner of a block, and the next number starts the new layer one cell to the right, then runs down, then left along the bottom, then up, then right along the top.
The block occupies rows through and columns through , so is in row , column . Its top row (row , columns –) reads .
The outer layer: goes to row , column ; – run down the right column; – run left along row ; – run up column , ending with in the top-left corner; and – fill row . Thus row , column holds .
Row from left to right: . Its least number is and its greatest is , with sum .
The answer is .
Review in the AoPS books
- Introduction to Counting & Probability, Chapter 5: More With Combinations (§5.2)
- Introduction to Number Theory, Chapter 1: Integers: The Basics
- Prealgebra, Chapter 15: Problem-Solving Strategies (§15.1)
- 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.