1996 AIME Problem 9

Attempt Problem 9 of the 1996 AIME below, then check your answer against the professionally curated solution from LIVE by Po-Shen Loh. You can also try the full timed exam, view all 1996 AIME solutions, or check the answer key.

All problems are used with official legal permission of the Mathematical Association of America (MAA).

9.

A bored student walks down a hall that contains a row of closed lockers, numbered 11 to 1024.1024. He opens locker 1,1, and then alternates between skipping and opening each closed locker thereafter. When he reaches the end of the hall, the student turns around and starts back. He opens the first closed locker he encounters, and then alternates between skipping and opening each closed locker thereafter. The student continues wandering back and forth in this manner until every locker is open. What is the number of the last locker he opens?
Answer: 342
Concepts:process simulationpattern recognitionarithmetic sequence
Small hint:
After each trip, the still-closed lockers form an arithmetic sequence
Big hint:
Record only the first term, common difference, and number of terms after each trip
Solution:
On every trip the student opens the first, third, fifth, and so on among the remaining lockers in his direction of travel. Tracking the closed arithmetic sequence after each trip gives:
trip first difference count
11 22 22 512512
22 22 44 256256
33 66 88 128128
44 66 1616 6464
55 2222 3232 3232
66 2222 6464 1616
77 8686 128128 88
88 8686 256256 44
99 342342 512512 22
Thus only lockers 342342 and 854854 remain after the ninth trip. On the tenth trip, starting from the right, locker 854854 is opened and 342342 remains. Therefore the last locker opened is 342.342.
LIVE by Po-Shen Loh
Programs

LIVE Classes

Self-Paced Classes

Stars

Scholarship

About Us

Who Is Po-Shen Loh?

Email Contact

Newsletter

Jobs

Become a Star

For a more Thought Full world.

© 2026 Expii, Inc.