Solution:
Let an be the first number remaining after n iterations, so a0=1, a1=2, a2=3, a3=5, etc. We claim that:
an+1=23an if an is even, and
an+1=23(an+1)−1 if an is odd.
We use induction on n.
Suppose an=2N. Consider the number 3N. There are initially N smaller numbers ≡1(mod3). So after the first iteration, it will lie in the 2Nth place. Hence, it will lie in first place after n+1 iterations.
Similarly, suppose an=2N+1. Consider 3N+2. There are initially N+1 smaller numbers ≡1(mod3). So after the first iteration, it will lie in the 2N+1st place. Hence, it will lie in first place after n+1 iterations. That completes the induction.
We may now calculate successively the members of the sequence: 1,2,3,5,8,12,18,27,41,62,93,140,210,315,473,710,1065,1598,2397. Hence 1598 is the last surviving number from 1,2,…,2002.