Generate Rudin-Shapiro Sequence
Compute the Rudin-Shapiro sequence — a binary sequence with low autocorrelation properties.
Set the term count, pick 0/1 or ±1 output, and hit Generate to get the Rudin-Shapiro sequence — each term comes from counting '11' pairs in n's binary form, with even parity giving +1 and odd giving -1. And everything runs in your browser. Nothing gets uploaded.
FAQ
How is the sequence computed?
Count the number of "11" pairs in the binary representation of n. If even, the term is +1; if odd, it's -1.
What are its properties?
The partial sums grow as O(√n), making it useful as a low-discrepancy sequence.
Is it related to the Thue-Morse sequence?
Both are automatic sequences defined by binary digit properties, but they measure different things (digit sum vs consecutive 1-pairs).
What is OEIS number?
The ±1 version is A020985; the 0/1 version is A020987.