Sub-Ramsey numbers for arithmetic progressions
aa r X i v : . [ m a t h . C O ] M a y Sub-Ramsey numbers for arithmetic progressions
Maria Axenovich and Ryan Martin
Department of Mathematics, Iowa State University, Ames, IA, 50011. [email protected], [email protected]
Abstract.
Let the integers 1 , . . . , n be assigned colors. Szemer´edi’s theorem implies that ifthere is a dense color class then there is an arithmetic progression of length three in that color.We study the conditions on the color classes forcing totally multicolored arithmetic progressionsof length 3.Let f ( n ) be the smallest integer k such that there is a coloring of { , . . . , n } without totallymulticolored arithmetic progressions of length three and such that each color appears on atmost k integers. We provide an exact value for f ( n ) when n is sufficiently large, and all extremalcolorings. In particular, we show that f ( n ) = 8 n/
17 + O (1). This completely answers a questionof Alon, Caro and Tuza. Key words.
Sub-Ramsey, Arithmetic Progressions, Bounded Colorings
1. Introduction
In this paper we investigate colorings of sets of natural numbers. We say that a subsetis monochromatic if all of its elements have the same color and we say that it is rainbow if all of its elements have distinct colors. A famous result of van der Waerden [5] can bereformulated in the following way.
Theorem 1.
For each pair of positive integers k and r there exists a positive integer M such that any coloring of integers , . . . , M with r colors yields a monochromaticarithmetic progression of length k . This theorem was generalized by the following very strong statement of Szemer´edi [4].
Theorem 2.
For every natural number k and positive real number δ there exists a naturalnumber M such that every subset of { , . . . , M } of cardinality at least δM contains anarithmetic progression of length k . This means that “large” color classes force monochromatic arithmetic progressions. Inthis paper we invesigate conditions on the color classes which force a totally multicoloredarithmetic progression of length three.Assume that the integers in { , . . . , n } are colored by r colors. Can we always findan arithmetic progression of length k so that all of its elements are colored with distinctcolors? We call such colored arithmetic progressions rainbow AP( k ).he answer to this question is “No”, for r ≤ ⌊ log n + 1 ⌋ . The following coloring c of { , . . . , n } , given by Jungi´c, et al. [3], demonstrates this fact. Let c ( i ) = max { q : i is divisible by 3 q } . This coloring has no rainbow arithmetic progressions of length 3 ormore.It is an open question to determine certain conditions which force the existence ofrainbow arithmetic progressions. There are two natural approaches which can be studied.First, one can fix the number of colors and require that each color class is not “too small”.Second, one can require that each color class is not “too big” to guarantee some rainbowarithmetic progression.The first approach for AP(3) and three colors, among others, was studied in [3] andcompletely resolved by Fon-Der-Flaass and the first author as follows.
Theorem 3. ([2])
Let [ n ] be colored in three colors, each color class has size larger than ( n + 4) / . Then there is a rainbow AP(3) . Moreover, for each n = 6 k − there is acoloring of [ n ] in three colors with the smallest color class of size k and with no rainbow AP(3) . The second approach was introduced and developed by Alon, et al. [1]. It was called“Sub-Ramsey numbers for arithmetic progressions” as a way to investigate the problemprovided that the size of the largest color class is bounded. Specifically, a coloring of [ n ]was called a sub- k -coloring if every color appears on at most k integers. For a given m and a given k , the Sub-Ramsey number , sr( m, k ), is defined to be the minimum n suchthat any sub- k -coloring of [ n ], n > n contains a rainbow AP( m ). When m = 3, i.e.,when the desired rainbow arithmetic progressions are of size three, the following boundswere proved in [1]. Theorem 4. As k grows, k < sr(3 , k ) ≤ (4 . o (1)) k . In that paper it was suggested that the lower bound is close to the correct order ofmagnitude for sr(3 , k ). Here, we show that the truth is away from both the lower andupper bounds. In theorem 6, we compute tight bounds for sr(3 , k ) in a dual form. Inparticular, theorem 6 implies the following:
Theorem 5.
For any k ≥ , (17 / k − ≤ sr(3 , k ) ≤ (17 / k + 10 . Moreover, for k large enough, we determine the value of sr(3 , k ) exactly.
2. Main ResultsDefinition 1.
We define f ( n ) to be the smallest integer k such that there is a coloringof [ n ] with the largest color class of size k and with no rainbow AP(3) . The following proposition allows us to determine sr(3 , k ) from f ( n ): Proposition 1.
The value sr(3 , k ) is the largest value of n such that k ≥ f ( n ) .Proof. Since there exists a k -bounded coloring of [sr(3 , k )] with no rainbow AP(3), f (sr(3 , k )) ≤ k . Assume that f (sr(3 , k ) + 1) ≤ k , then there is a k -bounded coloring of [sr(3 , k ) + 1]with no rainbow AP(3), a contradiction. 2or the rest of the paper, we analyze the function f ( n ). Theorem 6 immediately impliesthe conclusion we draw in theorem 5.We find an extremal coloring c with no rainbow AP(3) and with largest color class ofthe smallest possible size. Construction. c ( i ) = G , if i ≡ , R , if i ≡ ± , ± , ± , ± , B , if i ≡ ± , ± , ± , ± . Let q ( I ) be the size of the largest color class of c in the interval I and Q ( n ) = min { q ( I ) : I has length n } . It can be easily verified that Q ( n ) = ⌈ n − / ⌉ + ǫ , where ǫ = ( , n ≡ , , , otherwise . Theorem 6.
Let n = 2600 . If n ≥ n then f ( n ) = Q ( n ) . Any extremal coloring of { , . . . , n } is colored identically to a subinterval of Z colored by c . Moreover, for any n ≥ , Q ( n ) − ≤ f ( n ) ≤ Q ( n ) . Corollary 1. (cid:24) n − (cid:25) ≤ f ( n ) ≤ (cid:24) n − (cid:25) + 1 , for n ≥ . Moreover n − − ≤ f ( n ) ≤ n − , for n ≥ .Remark 1. We did not try to optimize the constant n . A more careful analysis of theproof results in a smaller number. We believe that in fact f ( n ) = Q ( n ) for all values of n and this must be a coloring of some subinterval of Z for all but a very small number ofvalues of n .
3. Definitions and Notations, Outline of the proof
Let [ n ] = { , . . . , n } . For convenience, sometimes we shall use the closed interval notation[1 , n ] for [ n ]. Let c : [ n ] → { R , G , B } . We say that a color X ∈ { R , G , B } is solitary if there is no x ∈ [ n −
1] such that c ( x ) = c ( x + 1) = X . For a set S ⊆ [ n ], we denoteby r ( S ) , g ( S ) , b ( S ) the number of elements in S colored R , G , B respectively. We write3 R | = r ([ n ]), | G | = g ([ n ]), | B | = b ([ n ]). If all elements of S have the same color X , wewrite c ( S ) = X .We say that the interval [ x, x + i ] is X - X -interval if c ( x ) = c ( x + i + 1) = X and c ( x + j ) = X for all 1 ≤ j ≤ i , note that the left X is included in the intervalbut the right one is not. For a color X , we define a set N ( X ) of neighbors of X asfollows N ( X ) = { i ∈ [ n ] : c ( i + 1) = X or c ( i −
1) = X } . For a sequence of colors A , A , . . . , A k , A i ∈ { R , G , B } , we say that a coloring c contains A A · · · A k in theinterval I if there is an integer x ∈ I , such that x + k ∈ I and c ( x + i ) = A i , i = 0 , . . . , k .Sometimes we shall simply say that I contains A A · · · A k . We use subintervals of [1 , n ]or subsets of [ n ] wherever convenient.In order to prove our upper bound on f ( n ), we consider an arbitrary coloring of [ n ]with no rainbow AP(3) and first reduce the analysis to the case of three colors only. Weshow that there must be a solitary color, say G . Moreover we show that each number inthe neighbor set of G must have the same color, say R . I.e., each integer colored G issurrounded by two integers colored R . Therefore the interval [1 , n ] can be split into G - G intervals and perhaps some initial and terminal intervals containing no G . Next, we showthat either each G - G interval has many integers colored R , thus arriving at a conclusionthat | R | ≥ Q ( n ) or that there are not too many integers colored G and either | R | or | B | is at least ( n − | G | ) / ≥ Q ( n ).We present the proof in the section 4, and all necessary technical lemmas in sections5, 6.
4. Proof of Theorem 6
Let c be a coloring of [ n ] with no rainbow AP(3). We shall conclude that one of the colorclasses has size at least Q ( n ). By lemma 2, we can assume that c uses three colors, say R , G , B . Lemma 4 implies an existence of a solitary color, without loss of generality G .If there are only two numbers of color G , then either R or B has size at least ( n − / ≥ n − /
17 + 3 > Q ( n ), for n ≥ n and ( n − / ≥ Q ( n ) − n ≥
1. Otherwise, bylemma 5, we can assume that the neighbor set of G is colored R . We can also assumethat there are two consecutive numbers colored B in [ n ]; otherwise, the cardinality of R is at least ( n − / > Q ( n ), for n ≥ n and ( n − / > Q ( n ) − n ≥ G is a solitary color and R is the color of its neighborhood, we see that c looksas follows: ∗ ∗ · · · ∗ ∗ RGR ∗ ∗ · · · ∗ ∗
RGR ∗ ∗ · · · ∗ ∗
RGR ∗ ∗ · · · ∗ ∗
RGR ∗ ∗ · · · ∗ ∗ , where ∗ ∈ { R , B } . Furthermore, there is a BB somewhere in [ n ]. CASE 1.
All G - G -intervals contain BB .Lemma 8 proves that the smallest length of a G - G interval containing BB is 15 andthere is no such interval of length 16. Assume first that there is such an interval oflength 15. Then lemma 9 shows that this coloring must be very specific, in particular, itis defined up to translation on all integers except, perhaps, every 15 th one. So, in thatcase, lemma 9 gives that | R | ≥ n − / − ≥ n − /
17 + 3 > Q ( n ) for n ≥ n and 8( n − / − > Q ( n ) − n ≥
1. If the smallest G - G interval has length 174hen lemma 10 says that the coloring of [ n ] must be a translation of c for all integersexcept, perhaps, every 17 th one. In this case | R | = Q ( n ). Finally, if all intervals havelength at least 18, lemma 8 proves that in fact, the smallest interval has length 21. Then | G | ≤ n/
21 + 1. Thus either | B | or | R | is at least ( n − | G | ) / ≥ (10 n − / > Q ( n )for n ≥ n and (10 n − / > Q ( n ) − n ≥ CASE 2.
There is a G - G -interval containing no BB .We split interval [1 , n ] and find a lower bound on the number of integers colored R ineach of those subintervals. There are two subcases we shall treat. In case 2 .
1, the initialsubinterval contains at least three G s, and we use our structural lemmas. Otherwise,we have case 2 .
2, in which we apply case 1 to a special subinterval. We shall define thefollowing special subintervals. ◦ I is the longest initial segment of [ n ] containing no BB and ending with G , I = [1 , l ], ◦ I is an interval following I , containing no BB except for the last two positions whichare colored BB , ◦ I = [ n ] − I − I , ◦ I ⊆ I is the longest initial segment of [1 , n ] containing no G , ◦ I ′ = [ l + 1 , l − I ′′ = I \ I ′ . ◦ I t is the longest terminal subinterval of [ n ] containing no BB . Case 2.1
Let g ( I ) ≥
3. Let g i be the number of G - G intervals of length i in I \ { l } .Lemma 6(b) and 6(c) claims that there is no GRG or GRRG in [ n ]. Thus each G - G interval in [ n ] has length at least 4 and g i = 0 for i ≤
3. In particular, | I | = | I | + P i ≥ ig i + 1.Since I contains no BB we have r ( I ) ≥ | I | / X i ≥ ( i/ g i . (1)Lemma 11 states that I ′ ⊆ I and r ( I ′ ) ≥ r ( I ). Since I ′′ does not contain any BB except at the last two positions, r ( I ′′ ) ≥ | I ′′ | / −
1. Thus r ( I ) = r ( I ′ ) + r ( I ′′ ) ≥ r ( I ) + | I ′′ | / − . (2)Finally, by lemma 12, r ( I ) ≥ ( | I | − / . (3)We can summarize (1), (2) and (3) as follows.5 R | = r ( I ) + r ( I ′ ) + r ( I ′′ ) + r ( I ) ≥ r ( I ) + | I ′′ | / − | I | − /
4= 2 r ( I ) + | I ′′ | / − n − | I | − | I ′ | − | I ′′ | − / ≥ ( n − / − r ( I ) − | I | / ≥ ( n − / " | I | / X i ≥ g i ( i/ − (1 / " | I | + X i ≥ ig i + 1 ≥ ( n − / | I | / X i ≥ g i ( i/ ≥ ( n − / X i ≥ g i = ( n − / g ( I ) − . Lemma 12 implies that g ( I ) − | G | − − g ( I ∪ I ) ≥ | G | − . So, | R | ≥ ( n − / | G | − . Let M = max {| R | , | B |} . By definition, it is the case that | R | ≤ M and | G | ≥ n − M .As a result, M ≥ | R | ≥ ( n − / | G | − ≥ ( n − / n − M − . Thus M ≥ n − ≥ n − /
17 + 3 ≥ Q ( n ) , for n ≥ n . We also have that M ≥ (17 n − / ≥ n − / > Q ( n ) − n ≥ Case 2.2
Let g ( I ) ≤
2. By symmetry, we can also assume that g ( I t ) ≤
2, otherwisewe can apply the previous calculation to the coloring defined as c ′ ( i ) = c ( n + 1 − i ), i ∈ [ n ]. Let J = [ n ] \ ( I ∪ I t ). If J contains no G then g ([ n ]) ≤ | R | or | B | isat least ( n − / ≥ n − /
17 + 3 ≥ Q ( n ) for n ≥ n , moreover ( n − / ≥ Q ( n ) − n ≥ G in J then we conclude that all G - G intervals in J ∪{ l } contain BB by lemma 7 and that r ( I ) ≥ | I | / r ( I t ) ≥ | I t | /
2. As in case 1, we observe that if J contains a G - G interval of length 15 then | R | ≥ n − / − ≥ n − / ≥ Q ( n ),for n ≥ n . In addition, if J ∪{ l } contains a G - G interval of length 17 then lemma 10 givesthat the coloring must be a translation of c except, perhaps on every 17 th position. In thiscase, | R | ≥ Q ( n ). Otherwise, the length of each G - G interval is at least 21. This followsfrom lemma 8. In that case, g ( J ) ≤ | J | /
21 + 1. Thus | G | ≤ g ( J ) + 4 ≤ ( n − /
21 + 5.Therefore either | R | or | B | is at least ( n −| G | ) / ≥ (10 n − / ≥ n − / > Q ( n ),for n ≥ n , moreover | R | ≥ n − / − ≥ Q ( n ) − n ≥ Note that this is the only time we need the value of 2600 for n , in all other calculations, a smallerbound of 900 is sufficient. . General lemmas for colorings with no rainbow AP(3)sLemma 1. The coloring c does not have any rainbow AP(3) s.Proof.
Consider AP(3) at positions i < j < k with c ( j ) = G . Then j = 0 (mod 17) andthen i = − k (mod 17). Therefore, by construction, c ( i ) = c ( k ) and this AP(3) is notrainbow.Now, let us have AP(3) at positions i < j < k such that c ( i ) = G . Then, since i = 0(mod 17) we have k = 2 j (mod 17). We claim that c ( j ) = c ( k ) in this case simply bymultiplying the numbers in corresponding congruence classes by two as follows: x x (mod 17) 2 4 8 -1 6 -7 -5 -3Therefore, in this case we see that this AP(3) is not rainbow and there is no rainbowAP(3) in our coloring. Lemma 2.
Let c be a coloring of [ n ] with no rainbow AP(3) , n ≥ and every color classof size at most m , ( n + 4) / ≤ m < ( n − / . Then there is a coloring c ′ of [ n ] with norainbow AP(3) , in three colors with each color class being the union of some color classesof c and such each color class of c ′ has size at most m .Proof. Let A , A , . . . be the color classes of c . Note first that if c ′ is formed by mergingcolor classes of c then c ′ does not have rainbow AP(3)s. If there were a rainbow AP(3) in c ′ , then it must be a rainbow AP(3) in c , a contradiction.Assume first that there are two color classes A and A of sizes more than ( n + 4) / S = [ n ] − A − A . Let the color classes of c ′ be A , A , S . If | S | > ( n + 4) / n + 4) /
6, thus there is a rainbow AP(3) in c ′ by Theorem 3, a contradiction. Otherwise, | S | ≤ ( n + 4) / ≤ m and all color classes in c ′ have sizes at most m .Now, assume that there is exactly one color class of size more than ( n + 4) /
6, say A .Let T = A ∪ A ∪ · · · ∪ A q such that | T | > ( n + 4) / | T \ A q | ≤ ( n + 4) /
6. Then, wesee that | T | ≤ ( n + 4) /
3. Therefore, n − | T | − | A | ≥ n − ( n + 4) / − m > ( n + 4) /
6. If wemake the new color classes A , T, [ n ] \ ( T ∪ A ), then by Theorem 3, there is a rainbowAP(3) in c ′ , a contradiction.Finally, if each color class has cardinality less than ( n + 4) / c ′ greedily. Let B = A ∪ A ∪ · · · A q and B = A q +1 ∪ · · · A r be two new colorclasses such that ( n + 4) / < | B i | ≤ ( n + 4) / i = 1 ,
2. Let B = [ n ] \ ( B ∪ B ). Then | B | ≥ ( n − /
3. If n ≥
21, then | B | > ( n + 4) / c ′ a contradiction. Lemma 3. ([2])
Let c be a coloring of [ n ] in three colors with no rainbow AP(3) . Let therebe integers x and z , ≤ x < z < n such that c ( x ) = c ( x +1) = X and c ( z ) = c ( z +1) = Z , X = Z . Then there is w , x < w < z such that ( c ( w ) = X , c ( w + 1) = Z ) or ( c ( w ) = Z , c ( w + 1) = X ). Lemma 4.
Let c be a coloring of [ n ] in three colors with no rainbow AP(3) . Then thereis a solitary color. roof. Assume the opposite. Let c be a coloring of [ n ] with colors R , G , B and such thateach color appears on consecutive positions somewhere in [ n ]. In particular, there arenumbers 1 ≤ x < y < z < n such that, without loss of generality, c ( x ) = c ( x + 1) = R , c ( y ) = c ( y + 1) = G , and c ( z ) = c ( z + 1) = B , and such that there are no two consecutiveintegers colored BB or RR in the interval [ x + 1 , z ].By lemma 3, there is a w , with x < w < z , such that ( c ( w ) = R and c ( w + 1) = B )or ( c ( w ) = B and c ( w + 1) = R ). Assume without loss of generality that x < w < y andthat w is closest to y satisfying this property, and c ( w ) = R , c ( w + 1) = B . Note that w + 1 < y −
1, otherwise { w, w + 1 , w + 2 } will be a rainbow AP(3). But now c ( w + 2) = B otherwise we shall contradict the choice of w . Therefore, we have c ( w +1) = c ( w +2) = B ,a contradiction. Lemma 5.
Let c be a coloring of [ n ] in three colors R , G , B with no rainbow AP(3) . Letcolor G be solitary. Then, either the neighbor set of G is monochromatic or there are atmost two numbers x, y with c ( x ) = c ( y ) = G .Proof. Note first that if c ( x ) = G , for some x ∈ { , . . . , n − } then c ( x −
1) = c ( x +1) ∈ { B , R } . Now, assume that there are two integers x, y , 1 ≤ x < y ≤ n , such that c ( x ) = c ( y ) = G but c ( z ) = G for all x < z < y and such that c ( x + 1) = R and c ( y −
1) = B . Assume that there are at least three integers colored G . Then, it is easyto see that we may assume that x ≥ y ≤ n −
2. Let y be at most n −
2, without lossof generality.If y + x is odd then c (( y + x + 1) /
2) = R and c (( y + x + 1) /
2) = B which follows fromconsidering the AP(3) { x + 1 , ( x + y + 1) / , y } and { x, ( x + y + 1) / , y + 1 } , respectively,a contradiction.If y + x is even and c ( y + 2) = B , we have c ( x + 2) = R . Then c (( x + y + 2) /
2) = R and c (( x + y + 2) /
2) = B from the AP(3) { x + 2 , ( x + y + 2) / , y } , and the AP(3) { x, ( x + y + 2) / , y + 2 } , a contradiction.If y + x is even and c ( y + 2) = G , consider the largest w , x < w < y such that c ( w ) = c ( w + 1) = R . Then one of w + y and w + 1 + y is even. Assume, without loss ofgenerality, that w + y is even. Then ( w + y ) / w + y + 2) / R because of AP(3)s { w, ( w + y ) / , y } and { w, ( w + y + 2) / , y + 2 } , a contradiction tomaximality of w .
6. Lemmas specific to the main theorem
In all of the following lemmas we consider a coloring c of [ n ] in three colors R , G , B witha solitary color G having all neighbors of color R . We also assume that this coloring hastwo consecutive integers colored B . The intervals I , I , I are defined as in the proof ofthe theorem in section 4. Lemma 6. (a) If x ∈ [1 , n − and c ( x ) , c ( x + 1) ∈ { G , B } then c ( x ) = c ( x + 1) = B .(b) [1 , n ] does not contain GRG (c) [1 , n ] does not contain GRRG .(d) If x ∈ [1 , n − and c ( x ) , c ( x + 2) ∈ { G , B } then c ( x ) = c ( x + 2) = B . roof. (a) Note that having c ( x ) = c ( x + 1) = G is impossible since G is a solitary color.Having exactly one integer x or x + 1 of color G and another of color B is impossiblesince the neighbors of G are colored with R .(b) Without loss of generality, we may assume that there are integers w, y ∈ [ n ], y > w and such that w, w + 1 , w + 2 is colored GRG and y is the least integer such that c ( y ) = c ( y + 1) = B . If y has the same parity as w then the AP(3) { w, ( w + y ) / , y } and { w + 2 , ( w + 2 + y ) / , y } imply that c (( w + y ) /
2) = c (( w + 2 + y ) /
2) = B . If y + 1 has thesame parity as w then the AP(3) { w, ( w + y +1) / , y +1 } and { w +2 , ( w +2+ y +1) / , y +1 } imply that c (( w + y + 1) /
2) = c (( w + 2 + y + 1) /
2) = B . This is a contradiction to theminimality of y .(c) Without loss of generality, we may assume that there are integers y, w ∈ [ n ] suchthat w, w + 1 , w + 2 , w + 3 is colored GRRG and that y is the least integer such that c ( y ) = c ( y + 1) = B . If w + y is even, then consider the following AP(3)s: { w, ( w + y ) / , y } and { w + 2 , ( w + 2 + y ) / , y } . It follows that c (( w + y ) /
2) = c (( w + y + 2) /
2) = B . Since y > ( w + y ) / > w , we have a contradiction to the minimality of y . If w + y is odd, theconsider the following AP(3)s: { w, ( w + y + 1) / , y + 1 } and { w + 3 , ( w + 3 + y ) / , y } . Itfollows that c (( w + y + 1) /
2) = c (( w + y + 3) /
2) = B . Since y > ( w + y + 1) / > w , wehave a contradiction to the minimality of y .(d) Note that c ( x ) = c ( x + 2) = G is impossible because of b). If { c ( x ) , c ( x + 2) } = { B , G } then, since c ( x + 1) = R , { x, x + 1 , x + 2 } is a rainbow AP(3). Lemma 7.
Let x < y , c ( x ) = c ( y ) = G and both intervals [1 , x ] and [ y, n ] contain BB s.Then [ x, y ] contains BB .Proof. Let w be the largest number such that w < x and c ( w ) = c ( w + 1) = B . Let z be the smallest number such that z > y and c ( z ) = c ( z −
1) = B . Assume withoutloss of generality that x − w ≤ z − y . By considering the AP(3)s { w, x, x − w } and { w + 1 , x, x − w − } , we have that c (2 x − w − , c (2 x − w ) ∈ { B , G } , and using lemma6 a), we have c (2 x − w −
1) = c (2 x − w ) = B . If x < x − w − < y , then we are done.Otherwise, 2 x − w − > y and 2 x − w − − y < z − y , a contradiction to the choice of z . IntervalLength Coloring6
G R R B R R G R R B R R B R R G R R R R B R R R R G R R B R R B R R B R R G R R R R R R B R R R R R R G R R x R y x R R x y R x R R G R R B R B B B R R B B B R B R R G R R B R R B R R B R R B R R B R R G R R R R B R R R R B R R R R B R R R R G R R x R R x y R x R R x R y x R R x R RTable 1.
Colorings of G - G intervals of lengths at most 21 containing B . Here, x, y ∈ { R , B } . emma 8. Let I be a G - G interval with at least one B . Then for each such I of lengthat most , I must be colored as in table .Proof. Let I = [0 , k − c (0) = c ( k ) = G . Because there is no rainbow AP(3), wemust have that c ( x ) = c (2 x ) for all x < k/ c (2 x − k ) = c ( x ) for all x > n/
2. Sincethe neighbor set of G is R , c (1) = c ( k −
1) = R . With these conditions we can exhibit allpossible colorings of I . The ones with at least one B are listed in table 1, for 1 ≤ k ≤ Lemma 9.
Let [ x, x + 14] be a G - G interval containing BB . Then c ( z ) = ( R , if ( z − x ) ≡ ± , ± , ± , ± , B , if ( z − x ) ≡ ± , ± , ± . Proof.
To simplify our calculations, we shift the indices so that considered G - G intervalis [0 ,
14] and the whole interval being colored is [1 − x, n − x ]. The lemma 8 shows thatthe coloring of [0 ,
15] must be as follows:
GRRBRBBRRBBRBRRG .In particular, we have that c (2 i ) = c ( i ) , c (2 i −
1) = c (7 + i ) , i ∈ { , . . . , } . (4)Let A = [ − w + 1 , z −
1] be the largest interval having the coloring c as in the statementof the lemma. I.e., for each y ∈ Ac ( y ) = ( R , if y ≡ ± , ± , ± , ± , B , if y ≡ ± , ± , ± z = 15 k + i , 0 < i <
15. If z ≤ n − x , we shall show that z must be colored as in c , thus contradicting the maximality of [ − w + 1 , z − − w ≥ − x then − w must be colored as in c , again contradicting the maximalityof [ − w + 1 , z − A = [ − w + 1 , z −
1] = [1 − x, n − x ].First we show that c ( z ) = G if i = 0. Assume that c ( z ) = c (15 k + i ) = G . If i ∈ { , , , , , , , , , } then either c ( z −
1) = B or ( c ( z −
2) = B and c ( z −
1) = R ). Wearrive at a contradiction since the neighbors of G are colored R and we can not havethree consecutive numbers colored BRG . For i ∈ { , , , } we consider the followingAP(3)s: { k − , k − , k + 1 } , { k − , k − , k + 2 } , { k − , k − , k + 3 } , { k + 5 , k + 7 , k + 9 } . Note that the first two terms in each of these four AP(3)shave distinct colors from the set { R , B } , thus the last terms can not be colored with G .Next we show that c (15 k + i ) = c ( i ). Case 1. k is even, i is even.Consider AP(3) { , (15 k + i ) / , k + i } . Since c ((15 k + i ) /
2) = c (15( k/
2) + i/
2) = c (15( k/
2) + i ) = c ( i ) , we have that c (15 k + i ) = c ( i ). Case 2. k is odd, i is odd.Consider AP(3) { , (15 k + i ) / , k + i } . Since c ((15 k + i ) /
2) = c (15(( k − /
2) + (15 + i ) /
2) = c (15(( k − /
2) + 15 + i ) = c ( i ) , we have that c (15 k + i ) = c ( i ).10 ase 3. k is odd, i is even.Consider AP(3) { , (15( k + 1) + i ) / , k + i } . Since c ((15( k + 1) + i ) /
2) = c (15(( k +1) /
2) + i/
2) = c (15(( k + 1) /
2) + i ) = c ( i ) , we have that c (15 k + i ) = c ( i ). Case 4. k is even, i is odd.Consider AP(3) { , (15 k + i + 15) / , k + i } . Since c ((15 k + i + 15) /
2) = c (15( k/
2) +( i + 15) /
2) = c (15( k/
2) + ( i + 15)) = c ( i + 15) = c ( i ) , we have that c (15 k + i ) = c ( i ). Lemma 10.
Let [ x, x + 16] be a G - G interval. Then c ( z ) = ( R , if ( z − x ) ≡ ± , ± , ± , ± , B , if ( z − x ) ≡ ± , ± , ± , ± . Remark:
The proof is almost identical to the proof of the previous lemma and can beeasily mimicked by replacing 15 with 17 and modifying corresponding indices.
Lemma 11. | I | ≤ | I | + 1 and r ( I ′ ) ≥ r ( I ) .Proof. Assume first that | I | ≥ | I | + 2. Let I = [1 , l ] and I = [ l + 1 , b + 1]. Recall that c ( l ) = G and c ( b ) = c ( b +1) = B . The following AP(3)s: { l − b, l, b } and { l − b − , l, b +1 } and lemma 6(a) imply that c (2 l − b ) = c (2 l − b −
1) = B , a contradiction to the fact that I does not contain BB . To prove the second statement, consider { x, l, l − x } , where x ∈ I and c ( x ) = R . Since 2 l − x ∈ I ′ and c (2 l − x ) = G , we have c (2 l − x ) = R . Therefore,for each x ∈ I such that c ( x ) = R there is a unique y ∈ I ′ such that c ( y ) = R . Lemma 12. If g ( I ) ≥ then g ( I ∪ I ) ≤ and r ( I ) ≥ ( | I | − / .Proof. Assume that I ∪ I contains at least three integers colored G . Since g ( I ) = 0 bydefinition of I , we have g ( I ) ≥
3. We know that I contains at least three G s as well.Then, there are x, x ′ ∈ I and y, y ′ ∈ I , such that c ( x ) = c ( x ′ ) = c ( y ) = c ( y ′ ) = G , x and x ′ are of the same parity and y and y ′ are of the same parity. Let x < x ′ and y < y ′ .Let b be the smallest integer such that c ( b ) = c ( b + 1) = B . Note that x ′ < b < y . Claim: n < b + 2 − x ′ . Assume not, then 2 b + 2 − x ′ ∈ [1 , n ], thus considering AP(3)s { x ′ , b, b − x ′ } and { x ′ , b + 1 , b + 2 − x ′ } we see that c (2 b − x ′ ) = c (2 b + 2 − x ′ ) = B .Now, the AP(3)s { x, b − ( x ′ − x ) / , b − x ′ } and { x, b + 1 − ( x ′ − x ) / , b + 2 − x ′ } showthat c ( b − ( x ′ − x ) /
2) = c ( b + 1 − ( x ′ − x ) /
2) = B . This contradiction to minimality of b proves the claim.Let z be the largest number such that z < y and c ( z ) = c ( z + 1) = B . Observe that2 z − y ≥ b − y ≥ n − x ′ − y + 1 = n − ( y − x ′ ) −
1. Since x ′ ≥ y ≤ n , wehave that 2 z − y ≥ n − n + 4 − ≥
3. Therefore we can consider the following AP(3) s : { z − y, z, y } , { z − y + 2 , z + 1 , y } , which imply that c (2 z − y ) = c (2 z − y + 2) = B . Then { z − y, z + ( y ′ − y ) / , y ′ } , { z − y + 2 , z + 1 + ( y ′ − y ) / , y ′ } give us that c ( z + ( y ′ − y ) /
2) = c ( z + 1 + ( y ′ − y ) /
2) = B , contradicting maximality of z .This proves that there are at most two integers colored G in I . In order to prove thesecond statement of the lemma we show that I does not contain BBBB .Assume that there is y ∈ I such that y + 3 ∈ I and y, y + 1 , y + 2 , y + 3 is colored BBBB . Assume that y and y + 2 have the same parity as x ′ (otherwise take y + 1 and y + 3). Then { x ′ , ( y + x ′ ) / , y } and { x, ( y + x ′ ) / , y + 2 } imply that c (( y + x ′ ) /
2) = c (( y + x ′ ) / B . Using the claim, we have that y ≤ n − < b + 2 − x ′ −
3. Thus( y + x ′ ) / < (2 b − / < b , a contradiction to the minimality of b .11 cknowledgments We would like to thank Zsolt Tuza for bringing this problem toour attention. We also thank an anonymous referee for helpful comments.
References
1. N. Alon, Y. Caro, Zs. Tuza,
Sub-Ramsey Numbers for Arithmetic progressions , Graphs andCombinatorics, (1989), 307–314.2. M. Axenovich, D. Fon-Der-Flaass, On rainbow arithmetic progressions , Electronic Journalof Combinatorics, (2004).3. V. Jungi´c, J. Licht (Fox), M. Mahdian, J. Neˇsetril, R. Radoiˇci´c, Rainbow Arithmetic Pro-gressions and Anti-Ramsey Results , Combinatorics, Probability and Computing (2003),599-620.4. E. Szemer´edi, Integer sets containing no k elements in arithmetic progression , Acta Arith. (1975), 299–345.5. B. L. van der Waerden, Beweis einer Baudetschen Vermutung , Nieuw Arch. Wisk. (1927),212–216.(1927),212–216.