Problem

Source: 2018 Taiwan APMO preliminary

Tags: combinatorics, number theory



$240$ students are participating a big performance show. They stand in a row and face to their coach. The coach askes them to count numbers from left to right, starting from $1$. (Of course their counts be like $1,2,3,...$)The coach askes them to remember their number and do the following action: First, if your number is divisible by $3$ then turn around. Then, if your number is divisible by $5$ then turn around. Finally, if your number is divisible by $7$ then turn around. (a) How many students are face to coach now? (b) What is the number of the $66^{\text{th}}$ student counting from left who is face to coach?