#A43 INTEGERS 14 (2014) ON DOUBLE 3-TERM ARITHMETIC PROGRESSIONS

Similar documents
On Double 3-term Arithmetic Progressions

RAINBOW 3-TERM ARITHMETIC PROGRESSIONS. Veselin Jungić Department of Mathematics, Simon Fraser University, Burnaby, B.C., Canada.

ZERO-SUM ANALOGUES OF VAN DER WAERDEN S THEOREM ON ARITHMETIC PROGRESSIONS

Monochromatic simplices of any volume

MONOCHROMATIC FORESTS OF FINITE SUBSETS OF N

Monochromatic Forests of Finite Subsets of N

ON MONOCHROMATIC ASCENDING WAVES. Tim LeSaulnier 1 and Aaron Robertson Department of Mathematics, Colgate University, Hamilton, NY 13346

ON MONOCHROMATIC LINEAR RECURRENCE SEQUENCES

RAMSEY THEORY: VAN DER WAERDEN S THEOREM AND THE HALES-JEWETT THEOREM

Monochromatic Homothetic Copies of f1; 1 + s; 1 + s +tg

On rainbow arithmetic progressions

Ultrafilters maximal for finite embeddability

Resolving a conjecture on degree of regularity of linear homogeneous equations

Quasi-Progressions and Descending Waves

Some New Exact van der Waerden numbers

Van der Waerden s Theorem and Avoidability in Words

Progressions of squares

Roth s Theorem on 3-term Arithmetic Progressions

arxiv: v1 [math.co] 22 Jan 2013

A PROBABILISTIC THRESHOLD FOR MONOCHROMATIC ARITHMETIC PROGRESSIONS

Degree of Regularity of Linear Homogeneous Equations

Remarks on a Ramsey theory for trees

Monochromatic Solutions to Equations with Unit Fractions

MONOCHROMATIC VS. MULTICOLORED PATHS. Hanno Lefmann* Department of Mathematics and Computer Science Emory University. Atlanta, Georgia 30332, USA

Van der Waerden Numbers with Finite Gap Sets of Size Three

Van der Waerden s Theorem and Avoidability in Words

Sub-Ramsey numbers for arithmetic progressions

Three Proofs of the Hypergraph Ramsey Theorem (An. Exposition)

SOME NEW EXAMPLES OF INFINITE IMAGE PARTITION REGULAR MATRICES

#A31 INTEGERS 11 (2011) COMPLETELY MULTIPLICATIVE AUTOMATIC FUNCTIONS

Combinatorics on Words:

A van der Waerden Variant

The van der Waerden complex

arxiv: v2 [math.co] 24 Oct 2012

Palindromic Ramsey Theory

Ramsey-type problem for an almost monochromatic K 4

RAMSEY THEORY. Contents 1. Introduction Arithmetic Ramsey s Theorem

A note on general sliding window processes

Marcin Witkowski. Nonrepetitive sequences on arithmetic progressions. Uniwersytet A. Mickiewicza w Poznaniu

Square-Difference-Free Sets of Size Ω(n )

On four color monochromatic sets with nondecreasing diameter

The Effect of Inequalities on Partition Regularity of Linear Homogenous Equations

On some inequalities between prime numbers

R(p, k) = the near regular complete k-partite graph of order p. Let p = sk+r, where s and r are positive integers such that 0 r < k.

Math 324 Summer 2012 Elementary Number Theory Notes on Mathematical Induction

Monochromatic and Rainbow Colorings

SUB-RAMSEY NUMBERS FOR ARITHMETIC PROGRESSIONS AND SCHUR TRIPLES

THE STRUCTURE OF RAINBOW-FREE COLORINGS FOR LINEAR EQUATIONS ON THREE VARIABLES IN Z p. Mario Huicochea CINNMA, Querétaro, México

Discrete Mathematics

On the Long-Repetition-Free 2-Colorability of Trees

RAMSEY THEORY. 1 Ramsey Numbers

MATH 324 Summer 2011 Elementary Number Theory. Notes on Mathematical Induction. Recall the following axiom for the set of integers.

Independence for Partition Regular Equations

m-gapped Progressions and van der Waerden Numbers

Unrolling residues to avoid progressions

Discrete Mathematics. Spring 2017

Schur s Theorem and Related Topics in Ramsey Theory

New lower bounds for hypergraph Ramsey numbers

Homework #2 Solutions Due: September 5, for all n N n 3 = n2 (n + 1) 2 4

Chordal Graphs, Interval Graphs, and wqo

BOUNDS ON ZIMIN WORD AVOIDANCE

Weak yet strong restrictions of Hindman s Finite Sums Theorem

ON THE STRENGTH OF RAMSEY S THEOREM FOR PAIRS

Monochromatic 4-term arithmetic progressions in 2-colorings of Z n

ALGEBRA. 1. Some elementary number theory 1.1. Primes and divisibility. We denote the collection of integers

REU 2007 Transfinite Combinatorics Lecture 9

INTERMINGLED ASCENDING WAVE M-SETS. Aaron Robertson Department of Mathematics, Colgate University, Hamilton, New York

Ramsey theory. Andrés Eduardo Caicedo. Graduate Student Seminar, October 19, Department of Mathematics Boise State University

Entropy as a measure of surprise

Slow P -point Ultrafilters

Ramsey theory. Andrés Eduardo Caicedo. Undergraduate Math Seminar, March 22, Department of Mathematics Boise State University

#A63 INTEGERS 17 (2017) CONCERNING PARTITION REGULAR MATRICES

Large subsets of semigroups

Alex Iosevich. September 17, 2003

CHAPTER 4: EXPLORING Z

FINITE ABELIAN GROUPS Amin Witno

Zero-sum square matrices

arxiv: v1 [math.co] 25 Apr 2013

Ramsey Theory. May 24, 2015

The Maximum Upper Density of a Set of Positive. Real Numbers with no solutions to x + y = kz. John L. Goldwasser. West Virginia University

Monotone Hamiltonian paths in the Boolean lattice of subsets

Off-diagonal hypergraph Ramsey numbers

Jeong-Hyun Kang Department of Mathematics, University of West Georgia, Carrollton, GA

#A32 INTEGERS 10 (2010), TWO NEW VAN DER WAERDEN NUMBERS: w(2; 3, 17) AND w(2; 3, 18)

Equations and Colorings: Rado s Theorem Exposition by William Gasarch

arxiv: v3 [math.co] 19 Aug 2016

arxiv: v4 [cs.dm] 26 Jan 2016

arxiv: v1 [math.co] 14 May 2010

Pigeonhole Principle and Ramsey Theory

Climbing an Infinite Ladder

Exponential triples. Alessandro Sisto. Mathematical Institute, St Giles, Oxford OX1 3LB, United Kingdom

Large Sets in Boolean and Non-Boolean Groups and Topology

Mathematical Induction. Section 5.1

ON THE LEAST NUMBER OF PALINDROMES IN AN INFINITE WORD

The Anti-Ramsey Problem for the Sidon equation

Tree-chromatic number

Pascal Ochem 1 and Elise Vaslet Introduction REPETITION THRESHOLDS FOR SUBDIVIDED GRAPHS AND TREES

Binary words containing infinitely many overlaps

Finite Induced Graph Ramsey Theory: On Partitions of Subgraphs

VAN DER WAERDEN S THEOREM.

Transcription:

#A43 INTEGERS 14 (2014) ON DOUBLE 3-TERM ARITHMETIC PROGRESSIONS Tom Brown Department of Mathematics, Simon Fraser University, Burnaby, B.C., Canada tbrown@sfu.ca Veselin Jungić Department of Mathematics, Simon Fraser University, Burnaby, B.C., Canada vjungic@sfu.ca Andrew Poelstra Department of Mathematics, Simon Fraser University, Burnaby, B.C., Canada asp11@sfu.ca Received: 3/26/13, Revised: 4/23/14, Accepted: 5/27/14, Published: 8/27/14 Abstract In this note we are interested in the problem of whether or not every increasing sequence of positive integers x 1 x 2 x 3 with bounded gaps must contain a double 3-term arithmetic progression, i.e., three terms x i, x j,andx k such that i + k =2j and x i +x k =2x j. We consider a few variations of the problem, discuss some related properties of double arithmetic progressions, and present several results obtained by using RamseyScript, a high-level scripting language. 1. Introduction In 1987, Tom Brown and Allen Freedman ended their paper titled Arithmetic progressions in lacunary sets [3] with the following conjecture. Conjecture 1. Let (x i ) i 1 be a sequence of positive integers with 1 x i K. Then there are two consecutive intervals of positive integers I,J of the same length, with i I x i = j J x j. Equivalently, if a 1 <a 2 < satisfy a n+1 a n K, for all n, thenthereexisti<j<ksuch that i + k =2j and a i + a k =2a j. If true, Conjecture 1 would imply that if the sum of the reciprocals of a set A = {a 1 <a 2 <a 3 < } of positive integers diverges, and a n+1 a n as n, and there exists K such that a i+1 a i a j+1 a j + K for all 1 i j, then A contains a 3-term arithmetic progression. This is a special case of the famous Erdős conjecture that if the sum of the reciprocals of a set A of positive integers diverges, then A contains arbitrarily long arithmetic progressions. Conjecture 1 is a well-known open question in combinatorics of words and it is usually stated in the following form:

INTEGERS: 14 (2014) 2 Must every infinite word over a finite alphabet consisting of positive integers contain an additive square, i.e., two adjacent blocks of the same length and the same sum? The answer is trivially yes in case the alphabet has size at most 3. For more on this question see, for example, [2, 5, 7]. Also see [8, 10, 11]. We mention two relatively recent positive results. Freedman [5] has shown that if a<b<c<dsatisfy the Sidon equation a + d = b + c, theneverywordon {a, b, c, d} of length 61 contains an additive square. His proof is a clever reduction of the general problem to several cases thatarethencheckedbycomputer. Ardal, Brown, Jungić, and Sahasrabudhe [1] proved that if an infinite word ω = a 1 a 2 a 3 has the property that there is a constant M, suchthatforany positive integer n the number of possible sums of n consecutive terms in ω does not exceed M, then for any positive integer k there is a k-term arithmetic progression {m + id : i =0,...,k 1} such that m+d i=m+1 a i = m+2d i=m+d+1 a i = = m+(k 1)d i=m+(k 2)d+1 The proof of this fact is based on van der Waerden s theorem [12]. This note is inspired by the second statement in Conjecture 1. Before restating this part of the conjecture we introduce the following terms. We say that a sequence of positive integers a 1 a 2 a 3 is with bounded gaps if there is a constant K such that a n+1 a n K for all positive integers n. We say that a sequence of positive integers a 1 a 2 a 3 contains a double k-term arithmetic progression if there are i, d, andδ such that for all j {0, 1,...,k 1}. a i+jd = a i + jδ Problem 1. Does every increasing sequence of positive integers with bounded gaps contain a double 3-term arithmetic progression? It is straightforward to check that Problem 1 is equivalent to the question above concerning additive squares: Given positive integers K and a 1 <a 2 <a 3 <, with a i+1 a i K for all i 1, let x i = a i+1 a i, i 1. Then x 1 x 2 x 3 is an infinite word over a finite alphabet of positive integers. Given an infinite word x 1 x 2 x 3 over a finite alphabet of positive integers, define a 1,a 2,a 3,...recursively by a 1 N,a i+1 = x i + a i, i 1. Then a 1 <a 2 <a 3 <,anda i+1 a i K for a i.

INTEGERS: 14 (2014) 3 some K and all i 1. In both cases, an additive square in x 1 x 2 x 3 corresponds exactly to a double 3-term arithmetic progression in a 1 <a 2 <a 3 <. The existence of an infinite word on four integers with no additive cubes, i.e., with no three consecutive blocks of the same length and the same sum, established by Cassaigne, Currie, Schaeffer, and Shallit [4], translates into the fact that there is an increasing sequence of positive integers with bounded gaps with no double 4-term arithmetic progression. But what about a double variation on van der Waerden s theorem? Problem 2. If the set of positive integers is finitely coloured, must there exist a colour class, say A = {a 1 <a 2 <a 3 < } for which there exist i<j<kwith a i + a k =2a j and i + k =2j? We have just seen that an affirmative answer to Problem 1 gives an affirmative answer to the question concerning additive squares. It is also true that an affirmative answer to Problem 1 implies an affirmative answer to Problem 2. Proposition 1. Assume that every increasing sequence of positive integers x 1 x 2 x 3 with bounded gaps contains a double 3-term arithmetic progression. Then if the set of positive integers is finitely coloured, there must exist a colour class, say A = {a 1 <a 2 <a 3 < },whichcontainsadouble3-termarithmeticprogression. Proof. We use induction on the number of colours, denoted by r. For r =1the conclusion trivially follows. Now assume that for every r-coloring of N there exists a colour class which contains a double 3-term arithmetic progression. By the compactness principle[9, Theorem 2.4] there exists M N such that every r-coloring of [1,M] (or of any translate of [1,M]) yields a monochromatic double 3-term arithmetic progression. Assume now that there is an (r + 1)-coloring of N for which there does not exist a monochromatic double 3-term arithmetic progression. Let the (r + 1)st colour class be C(r +1) = {x 1 <x 2 < }. By the induction hypothesis on r colours, C(r + 1) is infinite. By the assumption that every increasing sequence of positive integers x 1 x 2 x 3 with bounded gaps contains a double 3-term arithmetic progression, C(r +1)doesnothavebounded gaps. In particular, there is p 1 such that x p+1 x p M +2. But then the interval [x p +1,x p+1 1] contains a translate of [1,M]andiscolouredwithonlyr colours, so that [x p +1,x p+1 1] does contain a monochromatic double 3-term arithmetic progression. This contradiction completes the proof. More generally, if the set of positive integers is finitely coloured and if each colour class is regarded as an increasing sequence, must there be a monochromatic double k-term arithmetic progression, for a given positive integer k? What if the gaps between consecutive elements coloured with same colour are pre-prescribed, say at

INTEGERS: 14 (2014) 4 most 4 for the first colour, at most 6 for the second colour, and at most 8 for the third colour, and so on? In the spirit of van der Waerden s numbers w(r, k) [6] we define the following. Definition 1. For given positive integers r and k greater than 1, let w (r, k) be the least integer, if it exists, such that for any r-coloring of the interval [1,w (r, k)] there is a monochromatic double k-term arithmetic progression. For given positive numbers r, k, a 1,a 2,...,a r let w (k; a 1,a 2,...,a r ) be the least integer, if it exists, such that for any r-coloring of the interval [1,w (k; a 1,a 2,...,a r )] = A 1 A 2 A r such that for each i the gap between any two consecutive elements in A i is not greater than a i there is a monochromatic double k-term arithmetic progression. We will show that w (2, 3) is relatively simple to obtain. We will give lower bounds for w (3, 3) and w (4, 2) and a table with values of w (3; a 1,a 2,a 3 )for various triples (a 1,a 2,a 3 ) and propose a related conjecture. We will share with the reader some insights related to the general question about the existence of double 3-term arithmetic progressions in increasing sequences with bounded gaps. Finally, we will describe RamseyScript, a high-level scripting language developed by the third author that was used to obtain the colorings and bounds that we have established. 2. w (r, 3) Now we look more closely at w (r, 3), the least integer, if it exists, such that for every r-coloring of the interval [1,w (r, 3)] there is a monochromatic double 3-term arithmetic progression. Suppose that w (r, 3) does not exist for some r, but w (r 1, 3) does exist. Then, by the Compactness Principle, there is a coloring of the positive integers with r colours, say with colour classes A 1,A 2,...,A r, such that no colour class contains a double 3-term arithmetic progression. Then (a) A 1 contains no double 3-term arithmetic progression, (b) A 1 has bounded gaps because w (r 1, 3) exists, and (c) A 1 is infinite, because w (r 1, 3) exists. Let d 1,d 2,...be the sequence of consecutive differences of the sequence A 1.That is, if A 1 = {a 1,a 2,a 3,...} then d n = a n a n 1, n 1. Then the sequence d 1,d 2,... is a sequence over a finite set of integers which does not contain any additive square. Thus if there exists r such that w (r, 3) does not exist, then there exists a sequence over a finite set of integers which does not contain an additive square. It is conceivable that proving that w (r, 3) does not exist for all r (if this is true!) is easier than directly proving the existence of a sequence over a finite set of integers

INTEGERS: 14 (2014) 5 with no additive square. Theorem 2. w (2, 3) = 17. Proof. Colour [1,m] with two colours, with no monochromatic double 3-term arithmetic progressions. Then the first colour class must have gaps of either 1, 2, or 3. Thus the sequence of gaps of the first colour class is a sequence of 1s, 2s, and 3s, and this sequence must have length at most 7, otherwise there is an additive square, which would give a double 3-term arithmetic progression in the first colour class. Hence, the first colour class can contain at most 8 elements (only 7 consecutive differences) and similarly for the second colour class. This shows that w (2, 3) 8 + 8 + 1 = 17. On the other hand, the following 2-coloring of [1, 16] is with no monochromatic double 3-term arithmetic progressions: Hence w (2, 3) = 17. Theorem 3. w (3, 3) 414. 0010110100101101. The following 3-coloring of [1, 413] avoids monochromatic 3-term double arithmetic progressions: 0101102210100201200100221221010010220010112011211202210112122112202210 0110010220201122022002202001012212112122001001120121100110020022002110 2001101001121120210020011210201121122112122010110100110102201220201221 1210021122112122112200110011212200202202001212212112212200110010110012 0211212200220100112202200220200122102212211211002101220022001001100221 211010010110020022110010110010221211020220200220221001122011211. This coloring is the result of about 8 trillion iterations of RamseyScript, using the Western Canada Research Grid 1. We started with a seed 3-coloring of the interval [1, 61] and searched the entire space of extensions. Figure 1 gives the number of double 3-AP free extensions of the seed coloring versus their lengths. To get more information about w (3, 3) we define w (3, 3; d) tobethesmallest m such that whenever [1,m] is 3-coloured so that each colour class has maximum gap at most d, then there is a monochromatic double 3-term arithmetic progression. Our goal was to compute w (3; 3; d) for small values of d. (See Table 1.) We note that w (3, 3; d) is already difficult to compute when d is much smaller than w (2, 3) = 17. (In a 3-coloring containing no monochromatic double 3-term arithmetic progression the maximum gap size of any colour class is 17.) Freedman [5] showed that there are 16 double 3-AP free 51-termsequences having the maximum gap of at most 4. The fact that w (3, 3; 4) = 39 is an interesting contrast, and shows that considering a single sequence instead of partitioning an interval of positive integers into three sequences is somewhat less restrictive. 1 http://www.westgrid.ca

INTEGERS: 14 (2014) 6 Figure 1: Number of double 3-AP free extensions versus length Max gap d w (3, 3; d) 2 11 3 22 4 39 5 100 6 > 152 7? Table 1: Known Values of w (3, 3; d) Theorem 4. w (4, 2) 30830. Starting with the seed 2-coloring [1, 10] = {1, 4, 6, 7} {2, 3, 5, 8, 9, 10}, after 2 10 8 iterations RamseyScript produced a double 4-AP free 2-coloring of the interval [1, 30829], available at the web page http://people.math.sfu.ca/ vjungic/ Double/w-4-2.txt. 3. w (3; a, b, c) andw (k; a, b) Recall that w (3; a, b, c) is the least number such that every 3-coloring of [1,w (3; a, b, c)], with gap sizes on the three colours restricted to a, b, andc, re-

INTEGERS: 14 (2014) 7 spectively, has a monochromatic double 3-term arithmetic progression. Similarly, w (k; a, b) is the least number such that every 2-coloring of [1,w (k; a, b)], with gap sizes on the two colours restricted to a and b, respectively,hasamonochromatic double k-term arithmetic progression. Table 2 shows values of w (3; a, b, c) for some small values of a, b, andc. Table 3 shows values of w (k; a, b) for some small values of a, b, andk. Max Blue Gaps Max Green Gaps 3 4 5 6 7+ 3 22 4 31 31 5 33 38 43 6 33 41 44 45 7 33 41 46 46 46 8+ 33 41 46 46 47 Max Red Gap 3 Max Blue Max Green 5 6 7 8+ 5 100 6 > 113 > 133 7??? 8+???? Max Red Gap 5 Max Blue Gaps Max Green Gaps 4 5 6 7 8 9+ 4 39 5 49 63 6 56 79 91 7 76 96 >105 >121 8 81 96 >114 >131 >131 9 81 96 >114 >133 >133 >133 10 81 96 >114 >133 >135 >135 11+ 81 97 >114 >133 >135 >135 Max Red Gap 4 Table 2: Known Values and Bounds for w (3; a, b, c) Based on this evidence, we propose the following conjecture. Conjecture 2. The number w (3, 3) exists. The numbers w (4, 3) and w (2, 4) do not exist. Our guess would be that w (3, 3) < 500. Also we recall that w (2, 3) = 17 and w (4, 2) 30830.

INTEGERS: 14 (2014) 8 Red 2 3 2 7 3 11 17 Double 3-AP s Blue Blue Red 2 3 4+ 2 11 3 22 > 176 4+ 22 > 2690 > 3573 Double 4-AP s Blue Red 2 3 4 5+ 2 15 3 37 > 131000 4 > 25503?? 5+ > 33366??? Double 5-AP s Table 3: Known Values and Bounds for w (k; a, b) 4. Double 3-term Arithmetic Progressions in Increasing Sequences of Positive Integers In this section, we return to Problem 1: the existence of double 3-term arithmetic progressions in infinite sequences of positive integers with bounded gaps. We remind the reader of the meaning of the following terms from combinatorics of words. An infinite word over a finite subset S of Z, called the alphabet, is defined as amapω : N S and is usually written as ω = x 1 x 2, with x i S, i N. For n N, afactor B of the infinite word ω of length n = B is the image of asetofn consecutive positive integers by ω, B = ω({i, i +1,...,i + n 1}) = x i x i+1 x i+n 1. The sum of the factor B is B = x i + x i+1 + + x i+n 1. A factor B = ω({1, 2,...,n}) =x 1 x 2 x n is called a prefix of ω. Theorem 5. The following statements are equivalent: (1) For all k>1, every infinite word on{1, 2,..., k} has two adjacent factors with equal length and equal sum. (1a) For all k>1, thereexistsr = R(k) such that every word on {1, 2,...,k} of length R has two adjacent factors with equal length and equal sum. (2) For all n>1, ifx 1 <x 2 <x 3 < is an infinite sequence of positive integers such that x i+1 x i n for all i>1, thenthereexist1 i<j<ksuch that x i + x k =2x j and i + k =2j.

INTEGERS: 14 (2014) 9 (2a) For all n>1, thereexistss = S(n) such that if x 1 <x 2 <x 3 < <x S are positive integers with x i+1 x i n whenever 1 i S 1, thenthereexist 1 i<j<k S such that x i + x k =2x j and i + k =2j. (3) For all t>1, ifn = A 1 A 2 A t,thenthereexistsq, 1 q t, suchthat if A q = {x 1 <x 2 < },thenthereare1 i<j<ksuch that x i + x k =2x j and i + k =2j. (3a) For all t>1, thereexistst = T (t) such that for all a>1, if{a, a+1,...,a+ T 1} = A 1 A 2 A t, then there exists q, 1 q t, such that if A q = {x 1 <x 2 < <x p }, then there are 1 i<j<ksuch that x 1 + x k =2x j and i + k =2j. Remark 1. Note that in (3) and (3a) the statements concern coverings and not partitions (colorings). This turns out to be essential, since if we used colorings in (3) and (3a) (call these new statements (3 ) and (3a )), then (3 ) would not imply (2), although (2) would still imply (3a ). This can be seen from the proofs below. Remark 2. In each case i =1, 2, 3, the statement (ia) is the finite form of the statement (i). Proof. We start by proving that (2) implies (2a). (The proof that (1) implies (1a) follows the same form, and is a little more routine.) Suppose that (2a) is false. Then there exists n such that for all S>1thereare x 1 <x 2 <x 3 < <x S,withx i+1 x i n whenever 1 i S 1, such that there do not exist 1 i<j<k S such that x i + x k =2x j and i + k =2j. Replace x 1 <x 2 <x 3 < <x S by its characteristic binary word (of length x S ) B S = b 1 b 2 b 3 b xs defined by b i = 1 if i is in {x 1,x 2,x 3,...,x S },andb i =0otherwise. LetH be the (infinite) collection of binary words obtained in this way. Note that if B S is in H, then each pair of consecutive 1s in B S is separated by at most n 10s. Now construct, inductively, an infinite binary word w such that each prefix of w is a prefix of infinitely many words B S in H in the following way. Let w 1 be a prefix of an infinite set H 1 of words in H. Let w 1 w 2 be a prefix of an infinite set H 2 of words in H 1.Andsoon.Setw = w 1 w 2. Define x 1 <x 2 <x 3 < so that w is the characteristic word of x 1 <x 2 < x 3 < and note that x i+1 x i n for all i>1. Now it follows that there cannot exist 1 i<j<kwith x 1 + x k =2x j and i + k =2j. (For these i, j, k would occur inside some prefix of w. But that prefix is itself a prefix of some word B S = b 1 b 2 b 3 b S,wheretheredonotexistsuchi, j, k.) Thus if (2a) is false, (2) is false.

INTEGERS: 14 (2014) 10 Next we prove that (3) implies (3a). Suppose that (3a) is false. Then there exists t such that for all T there is, without loss of generality, a covering {1, 2,...,T} = A 1 A 2 A t such that there does not exist q with A q = {x 1 <x 2 < < x p } and i<j<kwith x 1 + x k =2x j and i + k =2j. Represent the cover {1, 2,...,T} = A 1 A 2 A t by a word B T = b 1 b 2 b 3 b T on the alphabet consisting of the non-empty subsets of {1, 2,...,t}. Here for each i, 1 i T, b i = {the set of p, 1 p t, such that i is in A p }.LetHbethesetofall words B T obtained in this way. Construct an infinite word w, on the alphabet consisting of the non-empty subsets of {1, 2,...,t}, suchthateachprefixofw is a prefix of infinitely many of the words B T in H. Thus w represents a cover N = A 1 A 2 A t, where A i = {j 1suchthati is in w j },1 i t, forwhichtheredoesnotexisti, A i = {x 1 <x 2 < }, with 1 i<j<ksuch that x 1 + x k =2x j and i + k =2j, contradicting (3). It is not difficult to show that (1) is equivalent to (2), that (1) is equivalent to (1a), that (2a) implies (2), and that (3a) implies (3). We have shown that (2) implies (2a) and that (3) implies (3a). The final steps are: Proof that (3) implies (2). If n and A 0 = {x 1 <x 2 <x 3 < } are given, with x i+1 x i n for all i>1, let A i = A 0 + i, 0 i n 1. Then N = A 0 A 1 A n 1,andnow(3)implies(2). Proof that (2) implies (3a). Assume (2), and use induction on t to show that if N = A 0 A 1 A t 1,thenthereexistsq, 0 q t 1, with A q = {x 1 <x 2 < } for which there exist i<j<kwith x i + x k =2x j and i + k =2j. Fort =1thisis trivial. Fix t>1, assume the statement 3a for this t, and let N = A 0 A 1 A t. If A t = {x 1 <x 2 < } is either finite or there exists n with x i+1 x i n for all i>1, then we are done by 2. Otherwise, there are arbitrarily long intervals [a, b] = B which are subsets of A 0 A 1 A t 1,andwearedonebytheinductionhypothesis. Remark 3. If true, perhaps (3a) can be proved by a method such as van der Waerden s proof that any finite coloring of N has a monochromatic 3-AP. Here is another remark on double 3-term arithmetic progressions. Theorem 6. The following two statements are equivalent: (1) For all n 1, everyinfinitesequenceofpositiveintegersx 1 <x 2 < such that x i+1 x i n contains a double 3-term arithmetic progression. (2) For all n 1, everyinfinitesequenceofpositiveintegersx 1 <x 2 < such that x i+1 x i n contains a double 3-term arithmetic progression x i,x j,x k with the property that j i = k j m for any fixed m N. Proof. Certainly (2) implies (1). We prove that (1) implies (2).

INTEGERS: 14 (2014) 11 Let n and m be given positive integers. Let X = {x 1 < x 2 < } be an infinite sequence with gaps from {1,...,n}. For j N we define y j = x jm+1 x (j 1)m+1. Note that m y j nm. Next we define an increasing sequence Z = {z 1 < z 2 < } with gaps from {m, m +1,...,nm} by z i = i y j = j=1 i i 1 x jm+1 x jm+1. j=1 By (1) the sequence Z contains a double 3-term arithmetic progression z p,z q,z r with z r z q = z q z p and p + r =2q. It follows that and From r j=q+1 r 1 x jm+1 x jm+1 = j=q q j=p+1 j=0 q 1 x jm+1 x rm+1 x qm+1 = x qm+1 x pm+1. j=p x jm+1 (pm +1)+(rm +1)=m(p + r)+2=2mq +2=2(mq +1) we conclude that x pm+1,x qm+1,x rm+1 form a double 3-term arithmetic progression with gap rm +1 (qm +1)=(r q)m m. Since m and X are arbitrary, we conclude that (2) holds. We wonder if one could get some intuitive evidence that it is easier to show that w (3, 3) exists than it is to show that every increasing sequence with gaps from {1, 2, 3,...,17} has a double 3-term arithmetic progression. The 17 is chosen because in a 3-coloring of [1,m]which has no monochromatic double 3-AP,the gaps between elements of this color class are colored with 2 colors, and w (2, 3) = 17. The utility RamseyScript was used for search of an increasing sequence with gaps from {1, 2, 3,...,17} with no double 3-term arithmetic progressions. The first search produced a sequence of the length 2207. The histogram with the distribution of gaps in this sequence is given on Figure 2. In another attempt we changed the order of gaps in the search, taking [16, 12, 11, 17, 10, 14, 15, 8, 5, 3, 6, 4, 2, 1, 13, 7, 9] instead of [1, 2,...,17]. RamseyScript produced a 5234-term double 3-AP free sequence. The corresponding histogram of gaps is given on Figure 3. Here are a few conclusion that one can make from this experiment.

INTEGERS: 14 (2014) 12 Figure 2: Histogram of Gaps in a 2207-term Double 3-AP Free Sequence 1. Initial choices of the order of gaps matter very much when constructing a double 3-AP free sequence, because we cannot backtrack in a reasonable (human) timespan at these lengths. 2. We do not really know anything about how long a sequence there will be. 3. The search space is very big. Table 4 gives the recursion tree size vs. maximum sequence length considered. Max. Sequence Size of Search 0 1 1 18 2 307 3 4931 4 78915 5 1216147 6 18695275 7 278661995 8???? Table 4: Recursion Tree Size vs. Maximum Sequence Length

INTEGERS: 14 (2014) 13 Figure 3: Histogram of Gaps in a 5234-term Double 3-AP Free Sequence 5. RamseyScript To handle the volume and variety of computation required by this project and related ones, we use the utility RamseyScript,developedbythethirdauthor,which provides a high-level scripting language. In creating RamseyScript, we had two goals: -ToprovideauniformframeworkforRamsey-typecomputationalproblems (which despite being minor variations of each other, are traditionally handled by ad hoc academic code). - To provide a correct and efficient means toactuallycarryoutthesecomputations. To achieve these goals, RamseyScript appears to the user as a declarative scripting language which is used to define a backtracking algorithm to be run. It exposes three main abstractions: search space, filters and targets. The search space is a set of objects typically r-colorings of the natural numbers or sequences of positive integers which can be generated recursively and checked to satisfy certain conditions, such as being squarefree or containing no monochromatic progressions. The conditions to be checked are specified as filters. Typically when extending RamseyScript to handle a new type of problem, only a new filter needs to be written. This saves development time and effort compared to writing a new program, while

INTEGERS: 14 (2014) 14 also making available additional features, e.g., for splitting the problem across a computing cluster. Finally, targets describe the information that should be shown to the user. The default target, max-length, informs the user of the largest object in the search space which passed the filters. With these parameters set, RamseyScript then runs a standard backtracking algorithm, which essentially runs as follows: 1. Start with some element x in the search space. For example, x might be the trivial coloring of the empty interval. 2. Check that x passes each filter. If not, skip steps 3 and 4. 3. Check each target against x (e.g., is x the longest coloring obtained so far?). 4. For each possible extension ˆx of x, repeatstep2. Forexample,ifx is the interval [1,n] and the search space is the set of r-colorings, then the possible extensions of x are the r colorings of [1,n+ 1] which match x on the first n elements. 5. Output the current state of all targets. Here is an example script to demonstrate these ideas and syntax: # Output a brief description echo Find the longest interval [1, n] that cannot be 4-colored echo without a monochromatic 3-AP or a rainbow 4-AP. # Set up environment set n-colors 4 set ap-length 3 # Choose filters filter no-n-aps filter no-rainbow-aps # Use the default target (max-length) # Backtrack on the space of 4-colorings search colorings Its output is find the longest interval [1, n] that cannot be 4_colored without a monochromatic 3_ap or a rainbow 4_ap.

INTEGERS: 14 (2014) 15 Added filter no-3-aps. Added filter no-rainbow-aps. #### Starting coloring search #### Targets: max-length Filters: no-rainbow-aps no-3-aps Dump data: Seed: [[] [] [] []] Max. coloring (len 56): [[removed due to length]] Time taken: 7s. Iterations: 4546107 #### Done. #### RamseyScript has many options to control the backtracking algorithm and its output. For full details see the README, availablealongsideitssourcecodeat https://www.github.com/apoelstra/ RamseyScript. It is licensed under the Creative Commons 0 public domain dedication license. Acknowledgement. The authors would like to acknowledge the IRMACS Centre at Simon Fraser University for its support. References [1] H. Ardal, T. Brown, V. Jungić, and J. Sahasrabudhe, On additive and abelian complexity in infinite words, Integers12 (2012), #A21. [2] Y.-H. Au, A. Robertson, and J. Shallit, Van der Waerden s theorem and avoidability in words, Integers 11 (2011), #A6. [3] T. C. Brown and A. R. Freedman, Arithmetic progressions in lacunary sets, RockyMountain J. Math. 17 (3) (1987), 587 596. [4] J. Cassaigne, J. D. Currie, L. Schaeffer, and J. Shallit, Avoiding three consecutive blocks of the same size and same sum, arxiv:1106.5204. [5] A. R. Freedman, Sequences on sets of four numbers, Integers,submitted. [6] R. Graham, B. Rothschild, and J. H. Spencer, Ramsey Theory (2nd ed.), JohnWileyand Sons, Inc., New York, 1990. [7] J. Grytczuk, Thue type problems for graphs, points, and numbers, DiscreteMath.308 (2008), 4419 4429. [8] L. Halbeisen and N. Hungerbühler, An application of van der Waerden s theorem in additive number theory, Integers0 (2000), #A7. [9] B. M. Landman and A. Robertson, Ramsey Theory on the Integers, AmericanMathematical Society, 2004. [10] G. Pirillo and S. Varricchio, On uniformly repetitive semigroups, SemigroupForum49 (1994), 125 129.

INTEGERS: 14 (2014) 16 [11] G. Richomme, K. Saari, and L. Q. Zamboni, Abelian complexity in minimal subshifts, J. London Math. Soc. 83 (1) (2011), 79 95. [12] B. L. van der Waerden, Beweis einer baudetschen vermutung, NieuwArchiefvoorWiskunde 15 (1927), 212 216.