MathDB
n light bulbs in a circle, 2 operations

Source: 2005 Cuba MO 1.2

September 15, 2024
combinatoricsnumber theory

Problem Statement

There are nn light bulbs in a circle and one of them is marked.
Let operation AA: Take a positive divisor dd of the number n,n, starting with the light bulb marked and clockwise, we count around the circumference from 11 to dndn, changing the state (on or off) to those light bulbs that correspond to the multiples of dd.
Let operation BB be: Apply operationA A to all positive divisors of nn (to the first divider that is applied is with all the light bulbs off and the remaining divisors is with the state resulting from the previous divisor).
Determine all the positive integers nn, such that when applying the operation on BB, all the light bulbs are on.