## 7. Light Bulbs

In the room, there are two light bulbs. When the switch of the first light bulb is turned on, it lights up after 6 seconds and stays on for 5 seconds, then it is off for 6 seconds and on for 5 seconds, and this repeats continuously. When the switch of the second light bulb is turned on, it lights up after 4 seconds and stays on for 3 seconds, then it is off for 4 seconds and on for 3 seconds, and this repeats continuously. Linda turned on both switches at the same time and turned them off after 2021 seconds. How many seconds did both light bulbs shine simultaneously during this time?
## Solution.

Every 11 seconds, the first light will repeat a cycle where it will not light for 6 seconds and then light for 5 seconds. The second light will repeat such a cycle every 7 seconds.

The time interval we need to observe as the common period for both lights lasts $7 \cdot 11=77$ seconds.

![](https://cdn.mathpix.com/cropped/2024_05_30_bfe8eca8742272ceb120g-5.jpg?height=42&width=1596&top_left_y=493&top_left_x=184)

![](https://cdn.mathpix.com/cropped/2024_05_30_bfe8eca8742272ceb120g-5.jpg?height=45&width=1619&top_left_y=560&top_left_x=161)$\qquad$
In the first two rectangles, the yellow color represents the seconds during which the lights are on, and the gray color represents the seconds during which the lights are off. The first rectangle shows the state of the first light, and the second shows the state of the second light. In the third rectangle, the seconds when both lights are on simultaneously are marked.

In the observed period of 77 seconds, both lights are on simultaneously for $1+3+1+3+2+2+3=$ 15 seconds. Since $2021=26 \cdot 77+19$, there will be 26 such periods, and then there will be 19 seconds remaining. In these 19 seconds, the lights will be on simultaneously for 2 seconds.

Both lights are on simultaneously for a total of $26 \cdot 15+2=392$ seconds.