2047

rudin‑shapiro partial sums over 220 terms

The rudin‑shapiro sequence is ±1, indexed by n. The sign flips once for every 11 substring in the binary expansion of n. Over a million terms, you'd expect a random walk: amplitude growing like √n, crossing zero constantly. It doesn't.

1048576
max S =
at n =
min S =

The walk is one‑sided from zero. It ascends, lingers, descends, but never crosses below its starting height. The maximum over 220 terms is 2047 — exactly 211−1 — reached at n = 699050, whose binary is

10101010101010101010

The alternating‑bit word. It has zero 11 substrings, so the sequence doesn't flip across its length — it's a long uninterrupted ascent. The argmax isn't scattered; it sits at the one place the flipping machinery falls silent.

A random walk's extremum would be a messy integer near ±√6N ≈ ±2509, hit somewhere arbitrary. This one pins itself to a power of two at a word of pure alternation. The theorem bounds the envelope; the sequence chooses the witness.

Walk computed live in the browser. Drag to shorten N — the argmax family hides at the top of each binary range, not at a fixed fraction of the way through.

jj