FindingMath

Beating 9/22 for sums with three different colors in the long run requires changing more than one odd number in 500

Version 1 Published 2026-11-23 DOI 10.5281/zenodo.24458376

Importance (self-rated) Notable

This rules out an entire odd-side neighborhood as a source of counterexamples to the proposed three-color optimum, without assuming parity structure on the evens.

Why it matters

Color the whole numbers from 1 to a large cutoff with three colors. One pattern makes two numbers and their sum all different colors about 41% of the time. To beat that fraction in the long run, even by a little, it takes more than changing every even number however you like: you must also recolor more than one odd number in 500.

Give each integer from 1 to n one of three colors. How often can two numbers and their sum all have different colors? One proposed coloring achieved 40% in the limit as n grew. Changing only the colors of odd numbers beat that mark, raising the fraction to 9/22. Could another small adjustment beat 9/22, especially if we could also change as many even numbers as we liked?

We prove that if at most one odd number in 500 differs from the proposed 9/22 pattern, the largest possible fraction still tends to 9/22. This holds wherever the changes fall and however the even numbers are colored. Even an arbitrarily small improvement in the limiting fraction requires crossing this fixed threshold on the odds.

The coloring and the count

A Schur triple is a sum x+y=z with all three numbers in [n]=\{1,\ldots,n\}. Call the sum rainbow if its three numbers have different colors. We count the summands in order: 1+2=3 and 2+1=3 each score one if the colors of 1, 2 and 3 differ. Dividing the score by the total number of ordered sums, n(n-1)/2, gives the rainbow fraction.

Parczyk and Spiegel proposed the coloring with limiting fraction 2/5. Hegde, Kumar and Pratibha (Theorems 1.1 and 2.3) raised the fraction to 9/22 and gave an upper bound of 8/15 when all colors are free to vary. Their coloring gives every even number color C. Odd numbers through 4n/11 are A, those above 4n/11 through 10n/11 are B, and the rest are A.

Every rainbow sum in this pattern uses two odds and one even. Changing some evens can create rainbow sums made up entirely of evens, at the cost of losing rainbow sums that use odds. Changing odds at the same time can affect that cost. To measure agreement with the pattern, we rename the three colors once for the whole interval, choosing the names that give the most matches on the odds. Our result applies whenever at least 499/500 of the odds match. The proof compares the gains and losses in two cases, according to how many evens differ from C.

Counts on finite intervals

Exhaustive counts for 13\le n\le21 found that every coloring with the highest score used a single color on the evens. On larger intervals we examined the odds nearest the two color boundaries, where recoloring has little effect, and the smallest evens, which are differences between nearby odds. At n=220 and 440 we tried every assignment of A or B to the nearest s odds on each side of each boundary, and every assignment of the three colors to the first s evens, for s=2,3,4,5. All other numbers kept their prescribed colors. Across the 520,450,560 assignments, a simple change gave the smallest loss at each edit count r=4j, 1\le j\le s: switching the j nearest odds on each side of each boundary cost exactly r^2/4 ordered rainbow sums.

That loss formula fails for more general changes. At n=25{,}344 we switched 144 odds on each side of each boundary, then gave the first eight evens color A and the next sixteen color B. These 600 changes cost 86,472 sums, below 600^2/4=90{,}000. The score still fell. To bound the rainbow fraction, it suffices to show that the score cannot improve in the limit; the loss need not follow an exact formula.

When many evens change

Write n=2m, so there are m odds and m evens. Let d count evens changed from C and h count odds that differ from their prescribed color. We allow h\le m/500+O(1), where O(1) denotes a bounded rounding allowance as m grows. This also covers odd n: deleting the last integer removes only O(n) sums (at most a constant times n) and moves each prescribed boundary by at most one odd position.

First keep the prescribed colors on the odds. A sum using both parities, called a mixed sum, contains exactly one even. Changing that even from C to A or B destroys every mixed rainbow sum containing it, since the odds use only A and B. Call this count the price of changing the even. The prices add because no mixed sum contains two evens.

For the even 2k, write t=k/m for its position as a fraction of the interval. Its price is 2mP(t)+O(1), where P can be computed from the lengths of the three color blocks. Scale the interval to [0,1], let f(s) be the prescribed odd color at position s, and write brackets for an indicator (one when the statement inside is true and zero otherwise). Then

P(t)=\int_0^{1-t}[f(s)\ne f(s+t)]\,ds+ \tfrac12\int_0^t[f(s)\ne f(t-s)]\,ds .
The first integral compares odds whose difference is 2k. Each unlike pair gives two summand orders when the even is added to the smaller odd. The second compares odds whose sum is 2k; both orders already appear as s varies, hence the factor of one half. To evaluate the integrals, we intersect the blocks with shifted copies for differences and reflected copies for sums. There are only a fixed number of endpoints, so replacing lengths by counts on the evenly spaced odd positions costs O(1) per price. The lengths vary linearly except at sums or differences of endpoints. Straight lines between the table entries therefore give the whole curve.

11t 0 1 2 3 4 5 6 7 8 9 10 11
11P(t) 0 2 3 4 5 6 7 6 6 5 4 3

How many new all-even rainbow sums could offset that price? If a evens become A and b become B, each new rainbow sum needs one of each. A fixed A,B pair gives at most four ordered sums: the third number is either their sum or their difference. Thus the gain is at most 4ab\le d^2. A second bound is useful when d is large. The first summand and the result of a rainbow sum form an unlike-colored pair. The result is the larger member, and subtracting the smaller member gives the second summand. Three color classes of total size m have at most m^2/3 unlike pairs, so the gain is also at most m^2/3.

Once d\ge m/11, even the cheapest d changes lose more mixed sums than the evens can gain. To see how much more, let u=d/m and sort the prices P(t) from low to high. Let Q(v) be the price level reached after taking the cheapest fraction v of the interval. The least mixed loss, divided by m^2, is G(u)+O(1/m), where G(u)=2\int_0^u Q(v)\,dv. Indeed, replacing P on each grid cell by its value at the right endpoint changes it uniformly by O(1/m), so the same error bound holds when selecting the cheapest cells.

The table gives Q(v)=2v up to v=1/11, then v+1/11 up to 2/11, then v/2+2/11 through v=3/5. For instance, price levels between 3/11 and 6/11 occur on two stretches, one rising and one falling with slope of magnitude one. Raising the price cutoff admits twice as much additional length as it would on just one stretch. Integrating the sorted prices and subtracting the all-even gain bound gives the margin in the figure.

Price of a single even change and the cumulative margin over the all-even gain bound.

Left: changing one even costs the fewest sums near the start of the interval. Right: the mixed loss for the cheapest fraction u of evens, less the all-even gain bound u^2, in units of m^2. Between 1/11 and 3/5 the margin exceeds the allowance for changes on the odds.

To calculate that allowance, observe that a number j occurs at most 2(n-j)+(j-1)<4m times as a summand or result. Even if every sum touched by an odd change became a new rainbow, the gain would be at most 4mh. In units of m^2 this is at most 4/500+O(1/m).

On [1/11,3/5], the margin G(u)-u^2 is concave because Q has slope at most one there. Its minimum is therefore at an endpoint. The endpoint values, 1/121 and 81/6050, both exceed 4/500. For u\ge3/5, use the other gain bound: prices are nonnegative, so G(u)-1/3\ge G(3/5)-1/3=727/18150>4/500. In both ranges the margin covers the odd changes and the grid error for all sufficiently large m.

When few evens change

When d\le m/11, the cheapest even changes cost so little that allowing a gain on every sum touched by an odd change gives too loose a bound. Here the order of repair matters. Restoring C to the evens while holding the odds fixed can actually lower the score, even with just two odd errors. Give 3 and 7 color C in the prescribed coloring on a sufficiently long interval. Changing 2 from C to B now gains eight ordered sums: the four pairs (1,3),(3,5),(5,7),(7,9) each have colors A and C and difference 2. The change loses just four sums, two at each A–B boundary. These account for every change because 1+1=2 is never rainbow and no all-even sum uses three colors.

We therefore first replace each odd C by A or B. For a given odd C, at least m-h-2d other odds have color A or B and differ from it by an unchanged even: each changed even excludes at most two neighbors. Choose the color opposite to the more common color among those neighbors. At least half now give a new rainbow sum with their even difference, each in two orders. Every rainbow lost by recoloring the odd used a changed even, since an odd C and an even C could not have belonged to a rainbow sum together. A fixed odd and even occur together in at most six ordered sums (at most three choices for the other odd, with two orders each). The gain of at least m-h-2d exceeds the loss of at most 6d for large m. We can repeat until no odd C remains. The number of odd errors never increases because every odd C was already an error.

With only A and B on the odds, the price of an even for the actual coloring of the odds is the number of mixed rainbow sums restored by returning that even to C. For a small even 2k, we can bound its price just by finding unlike odds spaced 2k apart. Number the odds in order from 1 to m. For k\le m/11, split these indices into k chains by starting at each index from 1 to k and repeatedly adding k. Each step corresponds to a difference of 2k between odd numbers. If a chain retains even one correctly colored position in each prescribed block, it visits A, then B, then A. At least two of its steps must cross between colors, wherever the errors fall.

Each block has at least \lfloor m/11\rfloor indices, so each chain meets each block at least \lfloor m/(11k)\rfloor\ge m/(22k) times. A chain missing all correct positions in any one block therefore uses at least that many errors. Since the chains are disjoint, at most 22kh/m can fail in this way. Each remaining chain gives two crossings and two summand orders per crossing. The price of 2k is thus at least 4k(1-22h/m)>3k for large m.

For larger evens, k>m/11, the table gives P(k/m)\ge2/11. Each odd error destroys at most six sums through this particular even, so its price is at least 4m/11-6h-O(1)>3d for large m. Combining the two ranges gives a price of at least 3\min(k,d) for each changed even. Among d distinct indices k, the sum of these bounds is smallest at 1,\ldots,d. Restoring the evens to C thus gains at least 3d(d+1)/2 mixed sums, more than the d^2 all-even rainbows it could lose whenever d>0.

Counting rainbow sums once the evens share a color

Write w_i for the color of odd number 2i-1. Once every even is C, each unlike pair of odds gives a rainbow sum using its difference, and another using its sum if the sum fits in [2m]. Counting both orders gives the rainbow count

2\sum_{i<j}[w_i\ne w_j]\big(1+[i+j\le m+1]\big).

The same colors w_i give a two-coloring of the indices 1,\ldots,m. Let U count ordered sums on these indices that use both colors. In each such sum, exactly two of the three pairs of positions have unlike colors. We can therefore count 2U by counting unlike pairs of positions in sums. First compare each summand with the result. Each unlike pair i<j occurs once for each choice of summand position, since the other summand must be j-i. Then compare the two summands: each unlike pair with i+j\le m occurs twice. The rainbow count above is exactly 2U plus the contribution from i+j=m+1, which is at most m.

Robertson and Zeilberger proved that every two-coloring of [m] has at least m^2/22-O(m) sums in which all three numbers have the same color, counting each pair of summands without regard to order. Doubling gives at least m^2/11-O(m) ordered sums of one color, since only O(m) have equal summands. Subtracting these from the m(m-1)/2 ordered sums gives 2U\le9m^2/11+O(m). The rainbow fraction on [2m] is therefore at most (9m^2/11+O(m))/(2m^2-m), which tends to 9/22. The prescribed coloring attains this limit.

Independent counting checks

Heule’s published Schur constraints on 1 through 160 encode which integers form sums on that interval. We extracted each mixed sum with distinct entries once and counted its two orders. With 3 and 7 colored C, changing 2 from C to B raised the count from 4,906 to 4,910, as predicted. We also enumerated all 4,094 sequences of two colors of lengths one through eleven. In every case the difference between the rainbow count and 2U was exactly the contribution from i+j=m+1.

To check the chain count, we used intervals with 1,000, 4,096 and 11,011 odd positions. For each step size k up to m/11, we used the allowed odd changes to erase correctly colored stretches of whole chains within the shortest block, taking the shortest stretches first. We then recounted all mixed rainbow sums through the even 2k with that even colored C. The smallest observed price divided by k was above 3.9 at each size. The proved lower bound of 3 applies wherever the odd changes fall.

Changing more than one odd number in 500 is necessary for a limiting improvement. How many must change at a minimum, and how high the rainbow fraction can go when all colors are free to vary, remain open.