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 A355340 #28 May 29 2024 07:04:26 %S A355340 0,1,3,2,1,0,2,3,7,6,4,5,6,7,5,4,1,0,2,3,0,1,3,2,6,7,5,4,7,6,4,5,3,2, %T A355340 0,1,2,3,1,0,4,5,7,6,5,4,6,7,2,3,1,0,3,2,0,1,5,4,6,7,4,5,7,6,1,0,2,3, %U A355340 0,1,3,2,6,7,5,4,7,6,4,5,0,1,3,2,1,0,2,3,7,6,4,5,6,7,5,4,2,3,1,0,3,2,0,1,5 %N A355340 a(0) = 0; for n >= 1, a(n) = a(n-1) XOR A001511(n), where XOR denotes bitwise exclusive-or (A003987) and A001511 is the binary ruler function. %C A355340 Related to the Thue-Morse sequence, A010060, which gives the rightmost binary bit of each term. The next bit is given by the closely related A269723. %C A355340 If we replace A001511(n) in the definition by A006519(n) = 2^(A001511(n)-1) we get Gray code (A003188). %C A355340 Interesting symmetries of the sequence seem more apparent with the terms aligned in suitable periods, such as the arrangement in the example section. %H A355340 Paolo Xausa, <a href="/A355340/b355340.txt">Table of n, a(n) for n = 0..16383</a> %H A355340 Rémy Sigrist, <a href="/A355340/a355340.png">Colored representation of the first 2^15 terms as 128 rows of 256 terms</a> (the color is function of a(x + 256*y), x = 0..255, y = 0..127) %H A355340 <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a> %F A355340 A010060(n) = a(n) mod 2. %F A355340 A269723(n) = floor(a(n)/2) mod 2. %e A355340 Initial terms arranged in periods of 16, with deliberate periodic spacing: %e A355340 0,1,3,2, 1,0,2,3, 7,6,4,5, 6,7,5,4, %e A355340 1,0,2,3, 0,1,3,2, 6,7,5,4, 7,6,4,5, %e A355340 3,2,0,1, 2,3,1,0, 4,5,7,6, 5,4,6,7, %e A355340 2,3,1,0, 3,2,0,1, 5,4,6,7, 4,5,7,6, %e A355340 . %e A355340 1,0,2,3, 0,1,3,2, 6,7,5,4, 7,6,4,5, %e A355340 0,1,3,2, 1,0,2,3, 7,6,4,5, 6,7,5,4, %e A355340 2,3,1,0, 3,2,0,1, 5,4,6,7, 4,5,7,6, %e A355340 3,2,0,1, 2,3,1,0, 4,5,7,6, 5,4,6,7, %e A355340 ... %e A355340 Note that when the arrangement is partitioned regularly into 2 X 2, 4 X 4 or 8 X 8 squares, the terms on any diagonal of a square share the same value. Note also the symmetry of the terms on the squares' circumferences. %t A355340 Block[{k = 0}, NestList[BitXor[#, IntegerExponent[k += 2, 2]] &, 0, 100]] (* _Paolo Xausa_, May 29 2024 *) %Y A355340 Comparable sequences: A010060, A261283, A269723. %Y A355340 Cf. A001511, A003188, A003987, A006519. %Y A355340 Positions of: odd numbers: A000069, even numbers: A001969, previously unseen numbers: A253317 (apparently). %K A355340 nonn,base,easy %O A355340 0,3 %A A355340 _Peter Munn_, Jun 29 2022