Generate Linus Sequence
Haskell, 146 140 137 133 118 bytes

s!l|take l s==take l(drop l s)=l|1&lt;2=s!(l-1)
g[w,x]|w&lt;x=1|1&lt;2=2
a 1=1
a n=g$(\s x-&gt;(x:s)!n)(a&lt;$&gt;[n-1,n-2..1])&lt;$&gt;[1,2]