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