AMC 10 Step by Step

2015 AMC 10B Problem 24

P21-25~7 minPrint

Aaron the ant walks on the coordinate plane according to the following rules. He starts at the origin p0=(0,0)p_0=(0,0) facing to the east and walks one unit, arriving at p1=(1,0)p_1=(1,0) . For n=1,2,3,…n=1,2,3,\dots , right after arriving at the point pnp_n , if Aaron can turn 90∘90^\circ left and walk one unit to an unvisited point pn+1p_{n+1} , he does that. Otherwise, he walks one unit straight ahead to reach pn+1p_{n+1} . Thus the sequence of points continues p2=(1,1),p3=(0,1),p4=(−1,1),p5=(−1,0)p_2=(1,1), p_3=(0,1), p_4=(-1,1), p_5=(-1,0) , and so on in a counterclockwise spiral pattern. What is p2015p_{2015} ?

Log in to save your progress.
Show solution without answering

Key insight

At square step numbers the ant sits at a spiral corner. Step 1936 is at (-22, 22); then 44 steps down and 35 steps right.

Solution

Step 20152015 is far too many to trace, so trace the first few turns, find a pattern, and jump ahead.

Step 1: trace the start. The spiral goes: 11 step east, 11 north, 22 west, 22 south, 33 east, 33 north, 44 west, 44 south, and so on. The side lengths are 1,1,2,2,3,3,4,4,…1, 1, 2, 2, 3, 3, 4, 4, \ldots

Step 2: look at square numbers. Add up the side lengths: 11, 1+1=21 + 1 = 2, +2=4+2 = 4, +2=6+2 = 6, +3=9+3 = 9, +3=12+3 = 12, +4=16+4 = 16. The square numbers 1,4,9,16,…1, 4, 9, 16, \ldots show up at every other corner. Here are those corners:

step11449916162525
point(1,0)(1, 0)(−1,1)(-1, 1)(2,−1)(2, -1)(−2,2)(-2, 2)(3,−2)(3, -2)

Step 3: the pattern for even squares. At step 22=42^2 = 4 the ant is at (−1,1)(-1, 1), and at step 42=164^2 = 16 it is at (−2,2)(-2, 2). In general, at step (2k)2(2k)^2 it is at (−k,k)(-k, k), the top-left corner, having just walked west. From there it turns left and walks south for 2k2k steps, then turns left again and walks east for 2k+12k + 1 steps.

(Check with k=1k = 1: from p4=(−1,1)p_4 = (-1, 1), 22 steps south reach (−1,−1)(-1, -1) at step 66, then 33 steps east reach (2,−1)(2, -1) at step 99. That matches the table.)

Step 4: jump to 2015. The largest even square not above 20152015 is 442=193644^2 = 1936 (and 452=202545^2 = 2025 is too big). So with k=22k = 22:
- At step 19361936 the ant is at (−22,22)(-22, 22).
- It walks 4444 steps south, reaching (−22,−22)(-22, -22) at step 1936+44=19801936 + 44 = 1980.
- Then it walks east. Step 20152015 is 2015−1980=352015 - 1980 = 35 steps later, at (−22+35,−22)=(13,−22)(-22 + 35, -22) = (13, -22).

The answer is (D) (13,−22)\boxed{\textbf{(D)}\ (13,-22)}.

Why this works

In a square spiral the side lengths go 1,1,2,2,3,3,…1, 1, 2, 2, 3, 3, \ldots, and adding them gives square numbers at every other corner. So square step numbers are easy landmarks. Work out a few small cases, find where the landmarks are and which way the ant is facing there, then jump to the landmark just below the step you want and walk the rest.

Alternative approach

Use odd squares instead. From the table, step (2k+1)2(2k+1)^2 is at (k+1,−k)(k + 1, -k), reached while walking east: step 99 is at (2,−1)(2, -1) and step 2525 is at (3,−2)(3, -2). So step 452=202545^2 = 2025 is at (23,−22)(23, -22). Step 20152015 is 1010 steps earlier on that same eastward stretch, so it is at (23−10,−22)=(13,−22)(23 - 10, -22) = (13, -22). Getting the same point from both landmarks is a good check.

Concise solution

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

Trace the spiral and record where the ant is at perfect-square indices:
p1=(1,0),p4=(−1,1),p9=(2,−1),p16=(−2,2),p25=(3,−2).p_1 = (1,0),\quad p_4 = (-1,1),\quad p_9 = (2,-1),\quad p_{16} = (-2,2),\quad p_{25} = (3,-2).
The pattern: from pk2p_{k^2} the ant walks a leg of length kk (turning left first), then a leg of length k+1k+1, using 2k+12k + 1 steps and arriving at p(k+1)2p_{(k+1)^2}. Each pair of legs moves the ant to the opposite diagonal corner one ring further out. In particular, for even indices
p(2k)2=(−k,k),p_{(2k)^2} = (-k, k),
reached while walking west, so the next leg goes south (length 2k2k) and the one after goes east (length 2k+12k+1).

Since 442=1936≤2015<2025=45244^2 = 1936 \le 2015 < 2025 = 45^2, start from p1936=(−22,22)p_{1936} = (-22, 22). The ant walks 4444 steps south to p1980=(−22,−22)p_{1980} = (-22, -22), then heads east. The remaining 2015−1980=352015 - 1980 = 35 steps go east:
p2015=(−22+35,−22)=(13,−22).p_{2015} = (-22 + 35, -22) = (13, -22).

The answer is (D) (13,−22)\boxed{\textbf{(D)}\ (13,-22)}.

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.