Print the difference in the Thue-Morse sequence
Python 3 2, 104 92 88 84 bytes



This is a pretty rudimentary solution based on building a ternary Thue-Morse sequence from scratch. This sequence is identical to the one being asked, though someone else will have to write a more thorough explanation of why that is. At any rate, this sequence is only a trivial modification of this one, A036580.

Edit: Changed the for loop into a list comprehension, changed from a function to a program, and changed the whole thing to Python 2. Thanks to Dennis for golfing help.

n=input()
s="2"
while len(s)&lt;n:s="".join(`[1,20,210][int(i)]`for i in s)
print s[:n]