Answer: 99.

Solution. Blue beads make up one fifth of the total. Therefore, there will be two consecutive blue beads (let's call them $a$ and $b$), separated by at least three beads. Note that $a$ and $b$ are part of no more than three good quartets, while the other blue beads are part of no more than four. If we add these inequalities, the right side will be $48 \cdot 4 + 2 \cdot 3 = 198$, and the left side will be twice the number of good quartets, since each will be counted twice. Therefore, there can be no more than 99 good quartets.

Let's provide an example of a necklace that gives exactly 99 good quartets:

$$
\text{RBYB; RBYB; ..; RBYB (25 times); RZ ...}
$$

(the ellipsis at the end means any combination of green and red beads). The good quartets will start at positions $1, 2, \ldots, 99$, and only these.
1. A necklace consists of 50 blue, 100 red, and 100 green beads. We will call a sequence of four consecutive beads good if it contains exactly 2 blue beads and one each of red and green. What is the maximum number of good quartets that can be in this necklace? (The beads in the necklace are arranged cyclically, meaning the last bead is adjacent to the first.)