OFFSET
1,2
MATHEMATICA
frombinrep[x_] := FromDigits[Flatten[Table[Table[If[OddQ[ n], 1, 0], {d, 1, x[[n]]}], {n, 1, Length[x]}]], 2]
repcount[x_] := Length/@Split[x]
l = {}; r = {}; Table[d = IntegerDigits[x, 2]; l = Flatten[{l, d}]; r = Flatten[{d, r}]; frombinrep[ repcount[EvenQ[l + r]]], {x, 1, DESIRED NUMBER OF TERMS HERE}]
CROSSREFS
KEYWORD
base,easy,nonn
AUTHOR
Dylan Hamilton, Oct 14 2010
STATUS
approved