Girish Mahajan (Editor)

Rudin–Shapiro sequence

Updated on
Edit
Like
Comment
Share on FacebookTweet on TwitterShare on LinkedInShare on Reddit

In mathematics the Rudin–Shapiro sequence, also known as the Golay–Rudin–Shapiro sequence is an infinite automatic sequence named after Marcel Golay, Walter Rudin and Harold S. Shapiro, who independently investigated its properties.

Contents

Definition

Each term of the Rudin–Shapiro sequence is either +1 or −1. The nth term of the sequence, bn, is defined by the rules:

a n = ε i ε i + 1 b n = ( 1 ) a n

where the εi are the digits in the binary expansion of n. Thus an counts the number of (possibly overlapping) occurrences of the sub-string 11 in the binary expansion of n, and bn is +1 if an is even and −1 if an is odd.

For example, a6 = 1 and b6 = −1 because the binary representation of 6 is 110, which contains one occurrence of 11; whereas a7 = 2 and b7 = +1 because the binary representation of 7 is 111, which contains two (overlapping) occurrences of 11.

Starting at n = 0, the first few terms of the an sequence are:

0, 0, 0, 1, 0, 0, 1, 2, 0, 0, 0, 1, 1, 1, 2, 3, ... (sequence A014081 in the OEIS)

and the corresponding terms bn of the Rudin–Shapiro sequence are:

+1, +1, +1, −1, +1, +1, −1, +1, +1, +1, +1, −1, −1, −1, +1, −1, ... (sequence A020985 in the OEIS)

Properties

The Rudin–Shapiro sequence can be generated by a four state automaton.

There is a recursive definition

{ b 2 n = b n b 2 n + 1 = ( 1 ) n b n

The values of the terms an and bn in the Rudin–Shapiro sequence can be found recursively as follows. If n = m·2k where m is odd then

a n = { a ( m 1 ) / 4 if  m = 1 mod 4 a ( m 1 ) / 2 + 1 if  m = 3 mod 4 b n = { b ( m 1 ) / 4 if  m = 1 mod 4 b ( m 1 ) / 2 if  m = 3 mod 4

Thus a108 = a13 + 1 = a3 + 1 = a1 + 2 = a0 + 2 = 2, which can be verified by observing that the binary representation of 108, which is 1101100, contains two sub-strings 11. And so b108 = (−1)2 = +1.

The Rudin–Shapiro word +1 +1 +1 −1 +1 +1 −1 +1 +1 +1 +1 −1 −1 −1 +1 −1 ..., which is created by concatenating the terms of the Rudin–Shapiro sequence, is a fixed point of the morphism or string substitution rules

+1 +1 +1 +1 +1 −1 +1 −1 +1 +1 −1 +1 −1 +1 −1 −1 +1 −1 −1 −1 −1 −1 −1 +1

as follows:

+1 +1 +1 +1 +1 −1 +1 +1 +1 −1 +1 +1 −1 +1 +1 +1 +1 −1 +1 +1 −1 +1 +1 +1 +1 −1 −1 −1 +1 −1 ...

It can be seen from the morphism rules that the Rudin–Shapiro string contains at most four consecutive +1s and at most four consecutive −1s.

The sequence of partial sums of the Rudin–Shapiro sequence, defined by

s n = k = 0 n b k ,

with values

1, 2, 3, 2, 3, 4, 3, 4, 5, 6, 7, 6, 5, 4, 5, 4, ... (sequence A020986 in the OEIS)

can be shown to satisfy the inequality

3 n 5 < s n < 6 n  for  n 1 .

References

Rudin–Shapiro sequence Wikipedia