Task

Create a Thue-Morse sequence.



See also
   YouTube entry: The Fairest Sharing Sequence Ever
   YouTube entry: Math and OCD - My story with the Thue-Morse sequence
   Task: Fairshare between two and more


F thue_morse_digits(digits)
   R (0 .< digits).map(n -> bin(n).count(‘1’) % 2)
 
print(thue_morse_digits(20))