Regular Sequences Eric Rowland School of Computer Science University of Waterloo, Ontario, Canada September 5, 2011 Eric Rowland (University of Waterloo) Regular Sequences September 5, 2011 1 / 38
Outline Motivation and basic properties 1 Sampler platter 2 Relationships to other classes of sequences 3 Eric Rowland (University of Waterloo) Regular Sequences September 5, 2011 2 / 38
Everyone’s favorite sequence Thue–Morse sequence: � 0 if the binary representation of n has an even number of 1s a ( n ) = 1 if the binary representation of n has an odd number of 1s. For n ≥ 0, the Thue–Morse sequence is 0 1 1 0 1 0 0 1 1 0 0 1 0 1 1 0 1 0 0 1 0 1 1 0 0 1 1 0 1 0 0 1 · · · . Rediscovered several times as an infinite cube-free word on { 0 , 1 } . a ( 2 n + 0 ) = a ( n ) a ( 2 n + 1 ) = 1 − a ( n ) Eric Rowland (University of Waterloo) Regular Sequences September 5, 2011 3 / 38
My favorite sequence Let ν k ( n ) be the exponent of the largest power of k dividing n . For n ≥ 0, the “ruler sequence” ν 2 ( n + 1 ) is 0 1 0 2 0 1 0 3 0 1 0 2 0 1 0 4 0 1 0 2 0 1 0 3 0 1 0 2 0 1 0 5 · · · . 6 5 4 3 2 1 3 7 15 31 63 ν 2 ( 2 n + 0 ) = 1 + ν 2 ( n ) ν 2 ( 2 n + 1 ) = 0 Eric Rowland (University of Waterloo) Regular Sequences September 5, 2011 4 / 38
Counting nonzero binomial coefficients modulo 8 � n � Let a ( n ) = |{ 0 ≤ m ≤ n : �≡ 0 mod 8 }| . m 60 50 40 30 20 10 2 4 8 16 32 64 1 2 3 4 5 6 7 8 5 10 9 12 11 14 14 16 5 10 13 20 13 18 20 24 · · · a ( 2 n + 1 ) = 2 a ( n ) a ( 4 n + 0 ) = a ( 2 n ) a ( 8 n + 2 ) = − 2 a ( n ) + 2 a ( 2 n ) + a ( 4 n + 2 ) a ( 8 n + 6 ) = 2 a ( 4 n + 2 ) Eric Rowland (University of Waterloo) Regular Sequences September 5, 2011 5 / 38
Definition Convention: We index sequences starting at n = 0. Definition (Allouche & Shallit 1992) Let k ≥ 2 be an integer. An integer sequence a ( n ) is k-regular if the Z -module generated by the set of subsequences { a ( k e n + i ) : e ≥ 0 , 0 ≤ i ≤ k e − 1 } is finitely generated. We can take the generators to be elements of this set. Every a ( k e n + i ) is a linear combination of the generators. In particular, a ( k e ( kn + j ) + i ) is a linear combination of the generators, which gives a finite set of recurrences that determine a ( n ) . Eric Rowland (University of Waterloo) Regular Sequences September 5, 2011 6 / 38
Homogenization For the Thue–Morse sequence: a ( 2 n + 0 ) = a ( n ) a ( 2 n + 1 ) = 1 − a ( n ) But we can homogenize: a ( 2 n ) = a ( n ) a ( 2 n + 1 ) = a ( 2 n + 1 ) a ( 4 n + 1 ) = a ( 2 n + 1 ) a ( 4 n + 3 ) = a ( n ) So a ( n ) and a ( 2 n + 1 ) generate the Z -module, and we have written a ( 2 n + 0 ) , a ( 2 n + 1 ) , a ( 2 ( 2 n + 0 ) + 1 ) , a ( 2 ( 2 n + 1 ) + 1 ) as linear combinations of the generators. Eric Rowland (University of Waterloo) Regular Sequences September 5, 2011 7 / 38
Basic properties Regular sequences inherit self-similarity from base- k representations of integers. The n th term a ( n ) can be computed quickly — using O ( log n ) additions and multiplications. The set of k -regular sequences is closed under. . . termwise addition termwise multiplication multiplication as power series shifting ( b ( n ) = a ( n + 1 ) ) modifying finitely many terms Eric Rowland (University of Waterloo) Regular Sequences September 5, 2011 8 / 38
Outline Motivation and basic properties 1 Sampler platter 2 Relationships to other classes of sequences 3 Eric Rowland (University of Waterloo) Regular Sequences September 5, 2011 9 / 38
More examples Regular sequences are everywhere. . . The length a ( n ) of the base- k representation of n + 1 is a k -regular sequence: a ( kn + i ) = 1 + a ( n ) . The number of comparisons a ( n ) required to sort a list of length n using merge sort is 0 0 1 3 5 8 11 14 17 21 25 29 33 37 41 45 · · · . This sequence satisfies � n � n � � a ( n ) = a ( ) + a ( ) + n − 1 2 2 and is 2-regular. Eric Rowland (University of Waterloo) Regular Sequences September 5, 2011 10 / 38
Dragon curve The coordinates ( x ( n ) , y ( n )) of paperfolding curves are 2-regular. Eric Rowland (University of Waterloo) Regular Sequences September 5, 2011 11 / 38
p -adic valuations of integer sequences ν k ( n + 1 ) is k -regular: a ( kn + k − 1 ) = 1 + a ( n ) a ( kn + i ) = 0 if i � = k − 1 . Bell 2007: If f ( x ) is a polynomial, ν p ( f ( n )) is p -regular if and only if f ( x ) factors as ( product of linear polynomials over Q ) · ( polynomial with no roots in Z p ) . ν p ( n !) is p -regular. Closure properties imply that ν p ( C n ) = ν p (( 2 n )!) − 2 ν p ( n !) − ν p ( n + 1 ) is p -regular. Eric Rowland (University of Waterloo) Regular Sequences September 5, 2011 12 / 38
p -adic valuations of integer sequences Medina–Rowland 2009: ν p ( F n ) is p -regular. The Motzkin numbers M n satisfy ( n + 2 ) M n − ( 2 n + 1 ) M n − 1 − 3 ( n − 1 ) M n − 2 = 0 . Conjecture If p = 2 or p = 5 , then ν p ( M n ) is p-regular. Open question Given a polynomial-recursive sequence f ( n ) , for which primes is ν p ( f ( n )) p-regular? Eric Rowland (University of Waterloo) Regular Sequences September 5, 2011 13 / 38
“Number theoretic combinatorics” The sequence of integers expressible as a sum of distinct powers of 3 is 2-regular: 0 1 3 4 9 10 12 13 27 28 30 31 36 37 39 40 · · · a ( 2 n ) = 3 a ( n ) a ( 4 n + 1 ) = 6 a ( n ) + a ( 2 n + 1 ) a ( 4 n + 3 ) = − 3 a ( n ) + 4 a ( 2 n + 1 ) The sequence of integers whose binary representations contain an even number of 1s is 2-regular: 0 3 5 6 9 10 12 15 17 18 20 23 24 27 29 30 · · · Let | n | w be the number of occurrences of w in the base- k representation of n . For every word w , | n | w is k -regular. Eric Rowland (University of Waterloo) Regular Sequences September 5, 2011 14 / 38
Nonzero binomial coefficients � n �≡ 0 mod p α }| . � Let a p α ( n ) = |{ 0 ≤ m ≤ n : m Glaisher 1899: a 2 ( n ) = 2 | n | 1 . Fine 1947: l � a p ( n ) = ( n i + 1 ) , i = 0 where n = n l · · · n 1 n 0 in base p . For example, a 5 ( n ) = 2 | n | 1 3 | n | 2 4 | n | 3 5 | n | 4 . It follows that a p ( n ) is p -regular. Eric Rowland (University of Waterloo) Regular Sequences September 5, 2011 15 / 38
Nonzero binomial coefficients Rowland 2011: Algorithm for obtaining a symbolic expression in n for a p α ( n ) . It follows that a p α ( n ) is p -regular for each α ≥ 0. For example: � l � � l − 1 � p − ( n i + 1 ) n i + 1 � � a p 2 ( n ) = ( n i + 1 ) · 1 + · . n i + 1 n i + 1 + 1 i = 0 i = 0 Expressions for p = 2 and p = 3: � 1 + 1 � a 4 ( n ) = 2 | n | 1 2 | n | 10 � 1 + | n | 10 + 1 4 | n | 11 + 4 3 | n | 20 + 1 � a 9 ( n ) = 2 | n | 1 3 | n | 2 3 | n | 21 Eric Rowland (University of Waterloo) Regular Sequences September 5, 2011 16 / 38
Nonzero binomial coefficients Higher powers of 2: � 1 + 1 10 + 3 8 | n | 10 + | n | 100 + 1 � a 8 ( n ) = 2 | n | 1 8 | n | 2 4 | n | 110 a 16 ( n ) = 1 + 5 12 | n | 10 + 1 2 | n | 100 + 1 8 | n | 110 2 | n | 1 + 2 | n | 1000 + 1 2 | n | 1010 + 1 2 | n | 1100 + 1 8 | n | 1110 + 1 16 | n | 2 10 + 1 2 | n | 10 | n | 100 + 1 8 | n | 10 | n | 110 + 1 48 | n | 3 10 Eric Rowland (University of Waterloo) Regular Sequences September 5, 2011 17 / 38
Powers of polynomials If f ( x ) ∈ F p α [ x ] , how many nonzero terms are there in f ( x ) n ? Such a sequence has an interpretation as counting cells in a cellular automaton. Here is ( x d + x + 1 ) n over F 2 for d = 2 , 3 , 4: Amdeberhan–Stanley ∼ 2008: Let f ( x 1 , . . . , x m ) ∈ F p α [ x 1 , . . . , x m ] . The number a ( n ) of nonzero terms in the expanded form of f ( x 1 , . . . , x m ) n is p -regular. Eric Rowland (University of Waterloo) Regular Sequences September 5, 2011 18 / 38
Another kind of self-similarity Here is a cellular automaton that grows like √ n : The length of row n is 2-regular. The number of black cells on row n is 2-regular. Eric Rowland (University of Waterloo) Regular Sequences September 5, 2011 19 / 38
Lexicographically extremal words avoiding a pattern What is the lexicographically least square-free word on Z ≥ 0 ? 0 1 0 2 0 1 0 3 0 1 0 2 0 1 0 4 0 1 0 2 0 1 0 3 0 1 0 2 0 1 0 5 · · · The n th term is ν 2 ( n + 1 ) . The lexicographically least k -power-free word is given by ν k ( n + 1 ) . k = 3: 0 0 1 0 0 1 0 0 2 0 0 1 0 0 1 0 0 2 0 0 1 0 0 1 0 0 3 0 0 1 0 0 · · · k = 4: 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 2 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 2 · · · Eric Rowland (University of Waterloo) Regular Sequences September 5, 2011 20 / 38
Lexicographically extremal words avoiding a pattern If w = w 1 w 2 · · · w l is a length- l word and r ∈ Q ≥ 0 such that r · l ∈ Z , let w r = w ⌊ r ⌋ w 1 w 2 · · · w l · ( r −⌊ r ⌋ ) be the word consisting of repeated copies of w truncated at rl letters. For example. . . ( deci ) 3 / 2 = decide ( raisonne ) 3 / 2 = raisonnerais ( schuli ) 3 / 2 = schulisch Eric Rowland (University of Waterloo) Regular Sequences September 5, 2011 21 / 38
Recommend
More recommend