This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A308059 #15 Oct 17 2023 05:12:01 %S A308059 1,1,2,1,3,1,4,1,5,4,3,6,1,8,1,9,8,2,5,8,3,10,8,8,10,10,12,12,13,8,12, %T A308059 16,16,17,5,13,16,18,18,20,20,21,16,20,24,24,25,16,24,27,16,25,18,26, %U A308059 32,32,33,1,16,32,34,34,36,36,37,1,18,32,36,40,40,41 %N A308059 Lexicographically earliest sequence of positive terms such that for any distinct m and n, a(m) XOR (2*a(m+1)) <> a(n) XOR (2*a(n+1)) (where XOR denotes the bitwise XOR operator). %H A308059 Rémy Sigrist, <a href="/A308059/b308059.txt">Table of n, a(n) for n = 1..10000</a> %e A308059 The first terms, alongside a(n) XOR (2*a(n+1)), are: %e A308059 n a(n) a(n) XOR (2*a(n+1)) %e A308059 -- ---- ------------------- %e A308059 1 1 3 %e A308059 2 1 5 %e A308059 3 2 0 %e A308059 4 1 7 %e A308059 5 3 1 %e A308059 6 1 9 %e A308059 7 4 6 %e A308059 8 1 11 %e A308059 9 5 13 %e A308059 10 4 2 %o A308059 (PARI) s=0; v=1; for(n=1, 72, print1(v", "); for (w=1, oo, if (!bittest(s,x=bitxor(v,2*w)), s+=2^x; v=w; break))) %Y A308059 See A308057 and A308058 for variants. %K A308059 nonn,look,base %O A308059 1,3 %A A308059 _Rémy Sigrist_, May 10 2019