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


steps = 6
 
tmp = ""
s1 = "0"
s2 = "1"
 
steps.times {
  tmp = s1
  s1 += s2
  s2 += tmp
}
 
puts s1