Exercise 3. We have 100 light bulbs, numbered from 1 to 100, each of which can be either on or off. These light bulbs are connected to three switches A, B, and C.

Pressing A changes the state of all the light bulbs: those that were on turn off, and those that were off turn on.

Pressing B changes the state only of the light bulbs with odd numbers.

Pressing C changes the state only of the light bulbs with numbers of the form 3n+1.

At the beginning of the evening, all the light bulbs were on. However, during the party and carried away by his enthusiasm, Igor pressed the switches a total of 1000 times, randomly. It turns out that the light bulbs numbered 95 and 96 are off.

How many light bulbs are still on?
Solution to Exercise 3

Let $\mathrm{a}, \mathrm{b}, \mathrm{c}$ be the number of times Igor pressed the switches $\mathrm{A}, \mathrm{B}, \mathrm{C}$. Therefore, $\mathrm{a}+\mathrm{b}+\mathrm{c}=1000$.

First, we note that pressing a switch an even number of times cancels out its effect.

Since 96 is even and not of the form $3n+1$, the state of the bulb at $\mathfrak{n}^{\circ} 96$ is determined by the parity of $a$. Since this bulb is off, $a$ must be odd.

Similarly, 95 is odd and not of the form $3n+1$, so the state of the bulb at $\mathrm{n}^{\circ} 95$ is determined by the parity of $a+b$. Since this bulb is off, $a+b$ must be odd. Since we have already established that $a$ is odd, it follows that $b$ is even.

From $\mathrm{a}+\mathrm{b}+\mathrm{c}=1000$, we deduce that $c$ is odd.

Thus, the bulbs are in the same state as if Igor had pressed the switches A and then C, which means he turned off all the bulbs and then turned on those numbered $3n+1$ (for $n=0,1,2, \ldots, 33$). Therefore, 34 bulbs remain on.