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? 
- A)
- B)
- C)
- D)
- E)
Answer
A
Key insight
Odd squares sit at top-right corners: 169 ends the 13×13 block at row 2, so that row holds 157–169, then 170 and 210 at its ends.
Solution
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 .
Why this works
In a square spiral, the squares of consecutive odd numbers mark the corners where layers close, and everything else is offset from those anchors. Locate the two layers that touch the target row (the block's top edge and the block's sides), then count from the nearest anchor. Verify the direction of travel from the given diagram rather than from memory.
The trap
Assuming the second row is 15 consecutive numbers, or misplacing the corners and reading off 211 + 157 = 368 or 212 + 157 = 369.
Common mistakes
- Assuming the second row is 15 consecutive numbers, or misplacing the corners and reading off 211 + 157 = 368 or 212 + 157 = 369.
- Putting odd squares in the wrong corner (e.g. bottom-right), which shifts every number in the row.
Techniques
Compute small cases, spot the pattern, generalize