A *** 1000 people, the first time, the remaining 500, the second time, the remaining 250, the third time, the remaining 125, the fourth time, the remaining 62, and so on, the ninth time, the remaining 1, so * * killed 9 times.
For the first killing, leave 2 in the first position, 4 in the second killing, 8 in the third killing, and so on. When killing for the ninth time, leave 2 9 = 5 12, so the mathematician is in No.512.