In mathematics, the RudinâÂÂShapiro sequence, also known as the GolayâÂÂRudinâÂÂShapiro sequence, is an infinite 2-automatic sequence named after Marcel Golay, Harold S. Shapiro, and Walter Rudin, who investigated its properties.
Each term of the RudinâÂÂShapiro sequence is either or . If the binary expansion of is given by
then let
(So is the number of times the block 11 appears in the binary expansion of .)
The RudinâÂÂShapiro sequence is then defined by
Thus if is even and if is odd.
The sequence is known as the complete RudinâÂÂShapiro sequence, and starting at , its first few terms are:
and the corresponding terms of the RudinâÂÂShapiro sequence are:
For example, and because the binary representation of 6 is 110, which contains one occurrence of 11; whereas and because the binary representation of 7 is 111, which contains two (overlapping) occurrences of 11.
The RudinâÂÂShapiro sequence was introduced independently by Golay, Rudin, and Shapiro. The following is a description of Rudin's motivation. In Fourier analysis, one is often concerned with the norm of a measurable function . This norm is defined by
One can prove that for any sequence with each in ,
Moreover, for almost every sequence with each is in ,
However, the RudinâÂÂShapiro sequence satisfies a tighter bound: there exists a constant such that
It is conjectured that one can take , but while it is known that , the best published upper bound is currently . Let be the n-th Shapiro polynomial. Then, when , the above inequality gives a bound on . More recently, bounds have also been given for the magnitude of the coefficients of where .
Shapiro arrived at the sequence because the polynomials
where is the RudinâÂÂShapiro sequence, have absolute value bounded on the complex unit circle by . This is discussed in more detail in the article on Shapiro polynomials. Golay's motivation was similar, although he was concerned with applications to spectroscopy and published in an optics journal.
The RudinâÂÂShapiro sequence can be generated by a 4-state automaton accepting binary representations of non-negative integers as input. The sequence is therefore 2-automatic, so by Cobham's little theorem there exists a 2-uniform morphism with fixed point and a coding such that , where is the RudinâÂÂShapiro sequence. However, the RudinâÂÂShapiro sequence cannot be expressed as the fixed point of some uniform morphism alone.
There is a recursive definition
The values of the terms r<sub>n</sub> and u<sub>n</sub> in the RudinâÂÂShapiro sequence can be found recursively as follows. If n = m÷2<sup>k</sup> where m is odd then
Thus u<sub>108</sub> = u<sub>13</sub> + 1 = u<sub>3</sub> + 1 = u<sub>1</sub> + 2 = u<sub>0</sub> + 2 = 2, which can be verified by observing that the binary representation of 108, which is 1101100, contains two sub-strings 11. And so r<sub>108</sub> = (−1)<sup>2</sup> = +1.
A 2-uniform morphism that requires a coding to generate the Rudin-Shapiro sequence is the following:
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
as follows:
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
with values
can be shown to satisfy the inequality
Let denote the RudinâÂÂShapiro sequence on , in which case is the number, modulo 2, of occurrences (possibly overlapping) of the block in the base-2 expansion of . Then the generating function
satisfies
making it algebraic as a formal power series over . The algebraicity of over follows from the 2-automaticity of by Christol's theorem.
The RudinâÂÂShapiro sequence along squares is normal.
The complete RudinâÂÂShapiro sequence satisfies the following uniform distribution result. If , then there exists such that
which implies that is uniformly distributed modulo for all irrationals .
Let the binary expansion of n be given by
where . Recall that the complete RudinâÂÂShapiro sequence is defined by
Let
Then let
Finally, let
Recall that the partition function of the one-dimensional Ising model can be defined as follows. Fix representing the number of sites, and fix constants and representing the coupling constant and external field strength, respectively. Choose a sequence of weights with each . For any sequence of spins with each , define its Hamiltonian by
Let be a constant representing the temperature, which is allowed to be an arbitrary non-zero complex number, and set where is the Boltzmann constant. The partition function is defined by
Then we have
where the weight sequence satisfies for all .