= More succinctly we can write the preceding statements as

Similar documents
Sums of Digits, Overlaps, and Palindromes

ON PATTERNS OCCURRING IN BINARY ALGEBRAIC NUMBERS

A Short Proof of the Transcendence of Thue-Morse Continued Fractions

arxiv: v1 [cs.dm] 2 Dec 2007

Letter frequency in infinite repetition-free words

arxiv:math/ v1 [math.co] 10 Oct 2003

Non-Repetitive Binary Sequences

Minimum Critical Exponents for Palindromes

arxiv: v1 [math.nt] 27 May 2014

Binary words containing infinitely many overlaps

A ternary square-free sequence avoiding factors equivalent to abcacba

A generalization of Thue freeness for partial words. By: Francine Blanchet-Sadri, Robert Mercaş, and Geoffrey Scott

Pistol-Dueling and the Thue-Morse Sequence

Concerning Kurosaki s Squarefree Word

Combinatorics on Words:

Doppler Tolerance, Complementary Code Sets and Generalized Thue-Morse Sequences

Morphisms and Morphic Words

The Ubiquitous Thue-Morse Sequence

arxiv: v1 [math.co] 6 Oct 2011

Bordered Conjugates of Words over Large Alphabets

THE RALEIGH GAME. Received: 1/6/06, Accepted: 6/25/06. Abstract

arxiv: v3 [math.co] 19 Aug 2016

RMT 2014 Power Round February 15, 2014

Van der Waerden s Theorem and Avoidability in Words

The obvious way to play repeated Battle-of-the-Sexes games: Theory and evidence.

A generalization of Thue freeness for partial words

RMT 2014 Power Round Solutions February 15, 2014

Restricted square property and infinite partial words

Extremal infinite overlap-free binary words

ON THE FRACTIONAL PARTS OF LACUNARY SEQUENCES

Games derived from a generalized Thue-Morse word

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

#A11 INTEGERS 12 (2012) FIBONACCI VARIATIONS OF A CONJECTURE OF POLIGNAC

Van der Waerden s Theorem and Avoidability in Words

Combinatorial Interpretations of a Generalization of the Genocchi Numbers

arxiv: v2 [math.co] 9 Aug 2011

An early completion algorithm: Thue s 1914 paper on the transformation of symbol sequences

IMPROVEMENTS ON CHOMP. Xinyu Sun Department of Mathematics, Temple University, Philadelphia, PA 19122, USA.

Generalized Thue-Morse words and palindromic richness extended abstract

On the Unavoidability of k-abelian Squares in Pure Morphic Words

Grade 11/12 Math Circles Fall Nov. 12 Recurrences, Part 3

Sierpinski's Triangle and the Prouhet-Thue-Morse Word DAVID CALLAN. Department of Statistics University Ave. November 18, 2006.

Non-repetitive Tilings

1. Introduction. Let P and Q be non-zero relatively prime integers, α and β (α > β) be the zeros of x 2 P x + Q, and, for n 0, let

BOUNDS ON ZIMIN WORD AVOIDANCE

arxiv: v5 [math.nt] 23 May 2017

SUMSETS MOD p ØYSTEIN J. RØDSETH

An identity involving the least common multiple of binomial coefficients and its application

Avoiding Large Squares in Partial Words

Slow k-nim. Vladimir Gurvich a

Tower-type bounds for unavoidable patterns in words

QUESTIONS ABOUT POLYNOMIALS WITH {0, 1, +1} COEFFICIENTS. Peter Borwein and Tamás Erdélyi

Generalized Thue-Morse words and palindromic richness

One Pile Nim with Arbitrary Move Function

ON THE DECIMAL EXPANSION OF ALGEBRAIC NUMBERS

Integer Solutions of the Equation y 2 = Ax 4 +B

WILLIAM LOWELL PUTNAM MATHEMATICAL COMPETITION. (3k(k + 1) + 1), for n 1.

Periodicity Algorithms and a Conjecture on Overlaps in Partial Words

Introduction to Techniques for Counting

Unit 1 Vocabulary. A function that contains 1 or more or terms. The variables may be to any non-negative power.

Multiple attractors in Newton's method

Finite automata and arithmetic

A van der Waerden Variant

Counting on Chebyshev Polynomials

DENSITY OF CRITICAL FACTORIZATIONS

Overlapping factors in words

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

Monotone Hamiltonian paths in the Boolean lattice of subsets

Theoretical Computer Science

Compositions, Bijections, and Enumerations

MI 4 Mathematical Induction Name. Mathematical Induction

, p 1 < p 2 < < p l primes.

Prime Numbers in Generalized Pascal Triangles

3 The language of proof

Algorithms: Lecture 2

Explicit solution of a class of quartic Thue equations

ACCUPLACER MATH 0310

One-to-one functions and onto functions

#A42 INTEGERS 10 (2010), ON THE ITERATION OF A FUNCTION RELATED TO EULER S

PERIODIC POINTS OF THE FAMILY OF TENT MAPS

Some Review Problems for Exam 2: Solutions

The Number of Rational Points on Elliptic Curves and Circles over Finite Fields

Generating Function Notes , Fall 2005, Prof. Peter Shor

Math Precalculus I University of Hawai i at Mānoa Spring

Martin Gardner and Wythoff s Game

ELLIPTIC CURVES BJORN POONEN

Grade 8 Chapter 7: Rational and Irrational Numbers

ON THE THREE-ROWED CHOMP. Andries E. Brouwer Department of Mathematics, Technical University Eindhoven, P.O. Box 513, 5600MB Eindhoven, Netherlands

ON THE EQUATION X n 1 = BZ n. 1. Introduction

Polynomial versus Exponential Growth in Repetition-Free Binary Words

arxiv: v1 [math.co] 27 Aug 2015

An Algebraic Characterization of the Halting Probability

INFINITE SEQUENCES AND SERIES

A hidden signal in the Ulam sequence. Stefan Steinerberger Research Report YALEU/DCS/TR-1508 Yale University May 4, 2015

Ch 7 Summary - POLYNOMIAL FUNCTIONS

Introduction to Generating Functions

Polynomial Operations

PERIODICITY OF SOME RECURRENCE SEQUENCES MODULO M

CHAPTER 1: Functions

Transcription:

Evil twins alternate with odious twins Chris Bernhardt Fairfield University Fairfield, CT 06824 cbernhardt@mail.fairfield.edu An integer is called evil if the number of ones in its binary expansion is even and odious if the number of ones in the binary expansion is odd. If we look at the integers between 0 and 15 we find that 0, 3, 5, 6, 9, 10, 12, 15 are evil and that 1, 2, 4, 7, 8, 11, 13, 14 are odious. Next we say that if two consecutive integers are evil then this is a pair of evil twins and that if two consecutive integers are odious then this is a pair of odious twins. Returning to the integers from 0 to 15 we see that {5, 6} and {9, 10} are two sets of evil twins and that {1, 2}, {7, 8} and {13, 14} are three pairs of odious twins. We can now state the new result of this paper: Theorem (Evil Twin). Evil twins alternate with odious twins. The terminology of evil and odious is fairly new coming from combinatorial game theory [2], but the theory connected to these numbers has many applications and a long history. One of the first results in the area is due to Prouhet [8]. If we look at the numbers from 0 to 15 we see that the number of evil numbers equals the number of odious numbers and that the sum of the evil numbers equals the sum of the odious numbers. More surprisingly the sum of the squares of the evil numbers equals the sum of the squares of the odious numbers and the sum of the cubes of the evil numbers equals the sum of the cubes of the odious numbers. If we let 0 0 = 1 we can write the preceding statements as 1 0 +2 0 +4 0 +7 0 +8 0 +11 0 +13 0 +14 0 = 0 0 +3 0 +5 0 +6 0 +9 0 +10 0 +12 0 +15 0 1 1 +2 1 +4 1 +7 1 +8 1 +11 1 +13 1 +14 1 = 0 1 +3 1 +5 1 +6 1 +9 1 +10 1 +12 1 +15 1 1 2 +2 2 +4 2 +7 2 +8 2 +11 2 +13 2 +14 2 = 0 2 +3 2 +5 2 +6 2 +9 2 +10 2 +12 2 +15 2 1 3 +2 3 +4 3 +7 3 +8 3 +11 3 +13 3 +14 3 = 0 3 +3 3 +5 3 +6 3 +9 3 +10 3 +12 3 +15 3 More succinctly we can write the preceding statements as 15 k is evil k j = 15 k is odious Prouhet proved the remarkable result: 1 k j for 0 j 3.

2 Theorem (Prouhet). k is evil k j = k is odious k j for 0 j n 1. In fact Prouhet proved a more general theorem. He looked at integers written in any given base b, and then partitioned 0, 1,... b n 1 according to the sum of their digits modulo b. He showed that the sums of the integers raised to the power j in each class was equal for any j satisfying 0 j n 1. There have been generalizations of this theorem. Lehmer [5] proved a generalization in 1947 and then Sinha [10] generalized it further in 1972. We will give the proof of the version Prouet s Theorem that we have stated above later, but a good place to start our study is with the Thue-Morse sequence. The Thue-Morse sequence For an integer n will define α(n) = 1 if n is evil and α(n) = 1 if n is odious. Then the Thue-Morse sequence is α(0), α(1), α(2),.... So the Thue-Morse sequence begins 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,... Often we will slightly simplify the notation by omitting the ones and just writing the signs; so the sequence will be written as + + + + + + + + Notice that the sequence has a nice property that after the first term + comes the negation of that term, that after the first two terms + comes the negation of those terms +, after the first four terms + + comes the negation + +. In general the terms from 2 n to 2 n+1 1 is just the negation of the terms from 0 to 2 n 1. This follows from the fact that if 0 k 2 then the binary expansion of 2 n +k has one more 1 in its binary expansion than does k (namely it has an extra 1 in the 2 n place) and so α(k) and α(2 n + k) have opposite signs. This property makes it very easy to write down the sequence, and will be important later when we come to generating functions. The Thue-Morse sequence has several other useful properties and has been used in a variety of areas of mathematics. We will briefly discuss some of these. For a more complete list of applications and history the reader should see [1].

One important area where the series occurs is in the application of symbolic dynamics to dynamical systems. Consider the map f(x) = 4x(1 x). We look at points x [0, 1] and see what we can say about the sequence x, f(x), f 2 (x), f 3 (x),... where f i denotes f composed (not multiplied) with itself i times. Now define 1 if 0 x <.5 β(x) = c if x =.5 1 if.5 < x 1. i.e., β tells us whether x is to the left or right of.5 or equal to.5. To greatly simplify things instead of considering our sequence x, f(x), f 2 (x), f 3 (x),... we consider the string of 1s and 1s and possibly a c given by β(x), β(f(x)), β(f 2 (x)), β(f 3 (x)),.... It turns out that for any sequence of 1s and 1s we can find an x with exactly that sequence. The Thue-Morse sequence then shows that there must be a point x that is not periodic and not eventually periodic. (A good introduction to symbolic dynamics is [3] Chapter 1.6.) This lack of periodicity was the property that Morse used the sequence for in proving a result in differential geometry about geodesics being recurrent but non-periodic on certain surfaces of negative curvature [6]. The Thue-Morse sequence has the property that it contains examples of blocks of symbols X such that XX occurs in the sequence. For example, if we take X to be + we find in the sequence ++ as consecutive terms, if we take X to be + we can find + + as consecutive terms in the sequence. Of course we have to be careful how we choose X. If we take X to be ++ we cannot find + + ++ as consecutive terms in the sequence, but the important point is that there do exist some blocks X such that XX occurs in the sequence. More interestingly, Axel Thue [11] and [12] (both reprinted in [7]) showed that there is no block of symbols X such that XXX occurs. This is sometimes referred to as saying that the Thue-Morse sequence is cube-free. Max Euwe, the Dutch chess grandmaster and mathematician, used this property to show that there could be infinite games of chess in which the same sequence of moves never occurred three times in succession [4]. (In particular, for us, this cube-free property means that there are no evil or odious triplets.) 3

4 One important way of proving results about this sequence is by looking at its generating function. This is what we do next. The Thue-Morse generating function Notice that (1 x)(1 x 2 ) = 1 x x 2 + x 3 and that the coefficients of the polynomial on the right are just the first four terms of the Thue-Morse sequence. If we take 1 x x 2 + x 3 and multiply by 1 x 4 we obtain a polynomial whose first four coefficients remain as before, and the coefficients of x 4 to x 7 are just the first four coefficients with the signs reversed. So we end up with a polynomial of degree 7 whose coefficients are the first eight terms in the Thue-Morse sequence. Inductively we can show that n 1 (1 x 2k ) = α(k)x k and thus obtain our generating function (1) (1 x 2k ) = α(k)x k. We now begin our study of twins. Suppose we multiply both sides of the equation above by 1 + x. We obtain (1 + x) (1 x 2k ) = (1 + x) α(k)x k = α(k)(x k + x k+1 ) = 1 + (α(k) + α(k 1))x k. Notice that α(k)+α(k 1) will take values of +2, 0 or 2 depending on whether k 1 and k are evil twins, not twins or odious twins, respectively. For small values of n it is easy to compute (1 + x) n 1 (1 x2k ) using a computer algebra system. It is suggested that the reader try various examples. For example, (1 + x) 3 (1 x 2k ) = 1 2x 2 + 2x 6 2x 8 + 2x 10 2x 14 + x 16

which tells, us as we observed before, that {5, 6} and {9, 10} are sets of evil twins and that {1, 2}, {7, 8} and {13, 14} are three pairs of odious twins. In the next two short sections we will give proofs of both the theorems stated in the introduction. Both follow from the generating function of the Thue-Morse sequence. We consider Proof that evil and odious twins alternate (1 + x) (1 x 2k ) = 1 + (α(k) + α(k 1))x k. As was stated before, with the exception of the first term, we know that the coefficients are +2, 0 or 2 depending on whether k 1 and k are evil twins, not twins or odious twins, respectively. Now (1 + x) (1 x 2k ) = (1 x 2 ) (1 x 2k ) (2) = (1 x 2 ) = (1 x 2 ) = (1 (x 2 ) 2k ) α(k)(x 2 ) k α(k)((x 2 ) k (x 2 ) k+1 ) = 1 + (α(k) α(k 1))x 2k. We see that the coefficient of x k is zero if k is odd. So that for {k 1, k} to be a pair of twins k must be even. (We didn t really need such a complicated argument to deduce this as it is clear that if k 1 is even then its last binary digit must be 0 so α(k 1) and α(k) must have opposite signs.) The more interesting conclusion is that {2k 1, 2k} is an evil pair if and only if α(k) = 1 and α(k 1) = 1; and {2k 1, 2k} is an odious pair if and only α(k) = 1 and α(k 1) = +1. This means that as we look along the Thue-Morse sequence whenever we see + in the k 1, k positions we know that 2k 1 and 2k will be evil twins; and whenever we see + in the k 1, k positions we know that 2k 1 and 2k will be odious twins; and there are no other sets of twins. Clearly, any finite string that begins and ends with + must contain a 5

6 +, and any finite string that begins and ends with + must contain a +. So evil twins must alternate with odious twins. Prouhet s Theorem In this final section we give a proof of Prouhet s theorem. There have been many proofs of this. We follow Roberts [9] and Wright [13] using difference operators. ([13] contains interesting history about this theorem and the connection with the Tarry-Escott problem.) Given any polynomial in one variable, P (x) say. Let E denote the operator defined by E(P (x)) = P (x + 1). So E can be thought of as translating the graph of P (x) one unit horizontally. For any positive iteger m we let E m denote E composed with m times. Thus E m (P (x)) = P (x + m). We also let I denote the identity operator, I(P (x)) = P (x). The key observation is that if P (x) is a polynomial of degree d then (I E m )(P (x)) = I(P (x)) E m (P (x)) = P (x) P (x + m) is a polynomial of degree d 1, and that if P (x) is a constant, P (x) = c, then (I E m )(P (x)) = I(P (x)) E m (P (x)) = c c = 0. We can now re-write the Thue-Morse generating function using the operator E. We obtain n 1 (I E 2k ) = Suppose that P (x) is a polynomial, then n 1 (I E 2k )P (x) = α(k)e k. α(k)e k P (x). Suppose that P (x) has degree d n 1, then by the key observation above we see that n 1 (I E2k )P (x) = 0 and so we obtain 0 = α(k)e k P (x) = Letting P (x) = x j, for 0 j n 1 gives 0 = α(k)(x + k) j. α(k)p (x + k).

7 Finally, putting x = 0 and re-arranging gives k is evil k j = which completes the proof. k is odious k j for 0 j n 1, Acknowledgment. We thank the anonymous referees for their many helpful suggestions. References [1] J-P. Alloche, J. Shallit, The ubiquitous Prouhet-Thue-Morse sequence, Sequences and Their Applications: Proceedings of Seta 98, Springer-Verlag, 1999, 1 16. [2] E. R. Berlekamp, J. H. Conway, R. K. Guy, Winning Ways for Your Mathematical Plays (Volume 3) A K Peters. Ltd, 2003 p. 463 [3] R. Devaney. An introduction to chaotic dynamical systems. Benjamin/Cummings, Menlo Park, 1986 [4] M. Euwe, Mengentheoretische Betrachtungen über das Schachspiel. Proc. Konin. Akad. Wetenschappen, Amsterdam 32 (1929), 633 642 [5] D. H. Lehmer, The Tarry-Escott problem. Scripta Math. 13, (1947). 37 41. [6] M. Morse, Recurrent geodesics on a surface of negative curvature. Trans. Amer. Math. Soc., 22 (1921), 84 100 [7] T. Nagel (Ed.) Selected Mathematical Papers of Axel Thue. Universtetsforlaget, Oslo, 1977, pp. 139 158, pp. 413 478 [8] E. Prouhet, Mémoire sur quelques relations entre puissances des nombres, C. R. Acad. Sci. Paris Sér. I (1851), 225. [9] J. B. Roberts, A Curious Sequence of Signs, American Mathematical Monthly, Vol. 64, No.5, (May 1957), 317 322. [10] T. N. Sinha A note on a theorem of Lehmer. J. London Math. Soc. (2) 4 (1971/72), 541 544. [11] A. Thue Über unendliche Zeichenreihen, Norske Vid. Selsk. Skr. I Math-Nat. Kl. 7 (1906), 1 22 [12] A. Thue Über die gegenseitige Lage gleicher Teile gewisser Zeichenreihen, Norske Vid. Selsk. Skr. I Math-Nat. Kl. Chris. 1 (1912), 1 67 [13] E. M. Wright, Prouhet s 1851 solution of the Tarry-Escott problem of 1910. Amer. Math. Monthly, 66 (1959) 199 201