Number theory · Divisor function · Perfect squares · Primes

Problem 4, 2023

← Prev · 118 / 245 · Next →

RegionalEnter the answer

In a school there are \(2023\) pupils and \(2023\) lockers, the lockers bearing the numbers \(1, 2, \ldots, 2023\). At the start every locker is closed. The pupils file past the lockers one after another and play the following game. The first pupil opens every locker. The second pupil goes to every second locker - those with even numbers - and changes its state. In general, the \(n\)-th pupil visits every \(n\)-th locker and changes its state: if the locker is open, the pupil closes it, and if it is closed, the pupil opens it. All \(2023\) pupils carry out this procedure.

(a) When the game is over, how many lockers are open?

(b) How many lockers were opened exactly twice and closed exactly once?

Sign in to check answers, open hints, read the full solution, and track your progress. Statements are always free.

Serbian Regional Competition (Okruzno takmicenje) 2023, high school grade I, category A, problem 4. Organized by the Mathematical Society of Serbia (DMS). Source