On a circle are placed nonnegative real numbers
$$\nwith indices taken modulo $n$ (so $x_{n+1}=x_1$, $x_{n+2}=x_2$, etc.).\nThey satisfy the local constraint $$\nx_i + x_{i+1} + x_{i+2} \le 1 \qquad\text{for all } i=1,2,\dots,n.\nFor such a configuration define
$$\nLet $M_n$ be the maximal possible value of $S$ over all admissible configurations $(x_1,\dots,x_n)$ satisfying the above condition. \nIt can be shown that for each positive integer $n$, the maximum $M_n$ is a rational number.\nFor the specific case $n=2026$, write $$\nM_{2026} \;=\; \frac{p}{q} $$\nin lowest terms, where $p$ and $q$ are coprime positive integers. \nDetermine the integer $p+q$.[THOUGHT] To maximize given the constraint for all , we first look for a pattern or structure in the sequence .
A reasonable guess is to consider a repeating pattern given the cyclic nature of the problem. Let's try a pattern where are always equal. Assume for all . Then the constraint becomes , so .
Substituting into , we get:
With , this becomes:
Next, we need to check if this is indeed the maximum. Consider a more general approach by examining a few small values of .
For : If , then:
For : If and , then:
For : If and , then:
These examples suggest that the maximum occurs when one out of every three consecutive terms is and the others are . This pattern can be generalized for any .
For , the pattern would repeat full times, with an additional 2 terms at the end. Each full cycle contributes to , so:
The last 2 terms can't contribute more than to without violating the constraint.
Thus:
To express this in lowest terms:
The numerator 682 and the denominator 9 are coprime (since 682 is not divisible by 3).
Therefore, and , and:
[/THOUGHT] \boxed{691}