Restricted mini challenges Robbers Thread Cops thread


Your task as robbers is to find cops solutions and write a program in the language provided that computes the nth term of the sequence using only the bytes in the provided set.  

The goal will be to crack as many cops answers as possible.  With each crack awarding you a single point.

Cracks need not be the cop's intended solution as long as they work.
Haskell, xnor



s=show s
ss=show[[s]]
w h=[ss!!h]&lt;show[h]


Try it online!

The first line defines s as the fixed point of the show function, which is the infinite string

"\"\\\"\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\...


It has "s at indices 0, 2, 6, 14, 30… Powers of two, minus two.

The second line defines ss as the string

[["\"\\\"\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\...


It has non-\s at indices 0, 1, 2, 4, 8, 16, 32… Powers of two, ignoring 0.

We’re in luck: in ASCII, " &lt; [ &lt; \, so we can write an indicator function for the less-than-backslashes in this string, and we’re done!

w h is our answer: it checks if the h’th element of ss is less than a backslash. Well, we can’t construct a string containing only a backslash, so we construct some other string that’s always bigger than "[", namely show[h].