Extremal sets for rainbow sum-free colorings with four to seven colors
Description
The rainbow Erd\H{o}s--Rothschild problem for Schur triples asks which subsets of $[n]=\{1,\ldots,n\}$ admit the most $r$-colorings in which no solution to $x+y=z$ has three distinct colors. We determine the unique maximizer for $4\le r\le7$ and all sufficiently large $n$. For $n=2N$ it is $[N-1,n]$, with $g(n,r)=r^N(3-2/r)^2$. For $n=2N+1$ and $5\le r\le7$ it is $[N,n]$, with $g(n,r)=r^{N+1}(3-2/r)$. For odd $n$ and $r=4$ it is $[n]$, with maximum $g([n],4)$, the number of admissible four-colorings of the full interval. This proves the sufficiently-large-$n$ form of a conjecture of Cheng, Jing, Li, Wang and Zhou. Their stability theorem reduces the problem to a few configurations. Near the upper interval, two matchings of Schur constraints form paths. A path counting bound gives geometric decay and reduces the sharp comparison and its equality cases to exact finite enumeration.