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 A331852 #7 Jan 31 2020 16:05:25 %S A331852 1,1,2,2,3,3,3,3,4,4,4,4,5,5,4,4,5,5,6,6,6,6,6,6,7,7,7,7,7,7,6,6,6,6, %T A331852 8,8,7,7,8,8,8,8,8,8,9,9,10,10,9,9,10,10,9,9,10,10,11,11,11,11,9,9,8, %U A331852 8,7,7,10,10,10,10,11,11,10,10,11,11,11,11,12 %N A331852 a(n) is the number of distinct values obtained by partitioning the binary representation of n into consecutive blocks, and then applying the bitwise XOR operator to the numbers represented by the blocks. %H A331852 Rémy Sigrist, <a href="/A331852/a331852.gp.txt">PARI program for A331852</a> %H A331852 <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a> %F A331852 a(2^k) = k+1 for any k >= 0. %F A331852 Apparently a(2^k-1) = A038348(k) for any k >= 0. %e A331852 For n = 6: %e A331852 - the binary representation of 6 is "110", %e A331852 - we can split it in 4 ways: %e A331852 "110" -> 6 %e A331852 "1" and "10" -> 1 XOR 2 = 3 %e A331852 "11" and "0" -> 3 XOR 0 = 3 %e A331852 "1" and "1" and "0" -> 1 XOR 1 XOR 0 = 0 %e A331852 - we have 3 distinct values, %e A331852 - hence a(6) = 3. %o A331852 (PARI) See Links section. %Y A331852 See A331851 for similar sequences. %Y A331852 Cf. A038348. %K A331852 nonn,base %O A331852 0,3 %A A331852 _Rémy Sigrist_, Jan 29 2020