gives the n^(th) term in the RudinShapiro sequence.


  • RudinShapiro[n] is 1 if n has an even number of possibly overlapping 11 sequences in its base-2 digits, and is -1 otherwise.
  • RudinShapiro automatically threads over lists.


open allclose all

Basic Examples  (2)

The sixth element of the RudinShapiro sequence:

The number 6 has an odd number of 11 sequences in its binary form:

The first ten elements of the sequence:

Display the values alongside the binary expansion:

Scope  (2)

RudinShapiro threads over lists:

Evaluate at large integers:

Applications  (2)

Generate an example of a first Shapiro polynomial:

Generate a RudinShapiro curve:

Properties & Relations  (3)

The RudinShapiro sequence has a nested structure:

The RudinShapiro sequence satisfies a recurrence relation:

The RudinShapiro sequence is the result of a substitution system:

Neat Examples  (1)

Generate a path based on the RudinShapiro sequence:

Wolfram Research (2015), RudinShapiro, Wolfram Language function,


Wolfram Research (2015), RudinShapiro, Wolfram Language function,


Wolfram Language. 2015. "RudinShapiro." Wolfram Language & System Documentation Center. Wolfram Research.


Wolfram Language. (2015). RudinShapiro. Wolfram Language & System Documentation Center. Retrieved from


@misc{reference.wolfram_2024_rudinshapiro, author="Wolfram Research", title="{RudinShapiro}", year="2015", howpublished="\url{}", note=[Accessed: 23-July-2024 ]}


@online{reference.wolfram_2024_rudinshapiro, organization={Wolfram Research}, title={RudinShapiro}, year={2015}, url={}, note=[Accessed: 23-July-2024 ]}