TOPICS

# Rudin-Shapiro Sequence

Let a number be written in binary as

 (1)

and define

 (2)

as the number of digits blocks of 11s in the binary expansion of . For , 1, ..., is given by 0, 0, 0, 1, 0, 0, 1, 2, 0, 0, 0, 1, 1, 1, 2, 3, ... (OEIS A014081).

Now define

 (3)

as the parity of the number of pairs of consecutive 1s in the binary expansion of . For , 1, ..., the first few values are 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, -1, -1, -1, ... (OEIS A020985). This is known as the Rudin-Shapiro, or sometimes Golay-Rudin-Shapiro sequence.

The summatory sequence of is then defined by

 (4)

giving the first few terms for , 1, ... as 1, 2, 3, 2, 3, 4, 3, 4, 5, 6, 7, 6, 5, 4, ... (OEIS A020986).

Interestingly, the positive integer occurs exactly times in the sequence, and the positions of in sequence are given by the number triangle

 (5)

(OEIS A093573).

For the special case , can be computed using the formula

 (6)

(Blecksmith and Laud 1995), giving for , 2, ... the values 2, 3, 3, 5, 5, 9, 9, 17, 17, 33, 33, 65, ... (OEIS A051032). This sequence is therefore pairs of terms of the sequence 2, 3, 5, 9, 17, ... (OEIS A000051; keeping only a single member of the initial term), i.e., numbers of the form .

Binary, Digit Block, Folding, Stolarsky-Harborth Constant

## Explore with Wolfram|Alpha

More things to try:

## References

Allouche, J.-P. and Shallit, J. "Example 5.1.5 (The Rudin-Shapiro Sequence)." Automatic Sequences: Theory, Applications, Generalizations. Cambridge, England: Cambridge University Press, pp. 78-80 and 154-155, 2003.Blecksmith, R. and Laud, P. W. "Some Exact Number Theory Computations via Probability Mechanisms." Amer. Math. Monthly 102, 893-903, 1995.Brillhart, J.; Erdős, P.; and Morton, P. "On the Sums of the Rudin-Shapiro Coefficients II." Pac. J. Math. 107, 39-69, 1983.Brillhart, J. and Morton, P. "Über Summen von Rudin-Shapiroschen Koeffizienten." Ill. J. Math. 22, 126-148, 1978.Mendes France, M. and van der Poorten, A. J. "Arithmetic and Analytic Properties of Paper Folding Sequences." Bull. Austral. Math. Soc. 24, 123-131, 1981.Sloane, N. J. A. Sequences A000051/M0717, A014081, A020985, A020986, A051032, and A093573 in "The On-Line Encyclopedia of Integer Sequences."

## Referenced on Wolfram|Alpha

Rudin-Shapiro Sequence

## Cite this as:

Weisstein, Eric W. "Rudin-Shapiro Sequence." From MathWorld--A Wolfram Web Resource. https://mathworld.wolfram.com/Rudin-ShapiroSequence.html