1. A necklace consists of 100 beads of red, blue, and green colors. It is known that among any five consecutive beads, there is at least one blue one, and among any seven consecutive beads, there is at least one red one. What is the maximum number of green beads that can be in this necklace? (The beads in the necklace are arranged cyclically, that is, the last one is adjacent to the first.)
Answer: 65.

Solution. Let there be a set of beads $A$ such that in every set of $n$ consecutive beads, there is at least one from $A$. We will show that $A$ contains no fewer than $\frac{100}{n}$ elements. Indeed, between any two adjacent beads from $A$, there are no more than $n-1$ beads. If the set $A$ contains $m$ elements, then

$$
100 \leqslant m+m(n-1)=m n, \quad \text { hence } \quad m \geqslant \frac{100}{n}
$$

By the proven result, the number of blue beads is no less than $\frac{100}{5}=20$, and the number of red beads is no less than $\frac{100}{7}=14 \frac{2}{7}$, which means at least 15. Therefore, the number of green beads is no more than $100-20-15=65$.

Let's provide an example of a necklace containing 65 green beads. Place the blue beads at positions that are multiples of 5, and the red beads at positions with the following numbers:

$$
1,8,14 ; 21,28,34 ; 41,48,54 ; 61,68,74 ; 81,88,94
$$

Fill the remaining positions with green beads.