Home / Get Math Help
Rudin-Shapiro Sequence
Alternate name
Sequence description
-1 raised to the power of the number of 11-blocks in the binary representation of n
Sequence terms
1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, -1, -1, -1, 1, -1, 1, 1, 1, -1, 1, 1, -1, 1, -1, ...
Program
a_n = (-1)^Count[Partition[IntegerDigits[n, 2], 2, 1], {1, 1}]
Table program
Table[(-1)^Count[Partition[IntegerDigits[k, 2], 2, 1], {1, 1}], {k, 0, n}]
Plot