%I #32 Jul 16 2022 01:04:45
%S 0,0,0,-1,0,0,0,-4,0,0,0,-1,0,0,0,-11,0,0,0,-1,0,0,0,-4,0,0,0,-1,0,0,
%T 0,-26,0,0,0,-1,0,0,0,-4,0,0,0,-1,0,0,0,-11,0,0,0,-1,0,0,0,-4,0,0,0,
%U -1,0,0,0,-57,0,0,0,-1,0,0,0,-4,0,0,0,-1,0,0,0,-11,0,0,0,-1,0,0,0,-4,0,0,0,-1,0,0,0,-26
%N Difference between the n-th element of the ruler function and the highest power of 2 dividing n.
%C Also rank of the n-th region of the diagram of compositions of j, if 1 <= n <= 2^(j-1), see example.
%C Here the rank of a region is defined as the largest part minus the number of parts (similar to the Dyson's rank of a partition).
%C The equivalent sequence for integer partitions is A194447.
%C Also triangle read by rows in which T(j,k) is the rank of the k-th region of the j-th section of the set of compositions in colexicographic order of any integer >= j. See A228366.
%H Antti Karttunen, <a href="/A228368/b228368.txt">Table of n, a(n) for n = 1..65537</a>
%F a(n) = A001511(n) - A006519(n).
%F a(4n-3) = a(4n-2) = a(4n-1) = 0. a(4n) = A001511(4n) - A006519(4n).
%e Illustration of initial terms (n = 1..16):
%e -----------------------------------------------
%e . Largest Number of
%e . Diagram of part of parts of
%e . compositions region n region n
%e -----------------------------------------------
%e n A001511(n) A006519(n) a(n)
%e -----------------------------------------------
%e .
%e 1 _| | | | | 1 1 0
%e 2 _ _| | | | 2 2 0
%e 3 _| | | | 1 1 0
%e 4 _ _ _| | | 3 4 -1
%e 5 _| | | | 1 1 0
%e 6 _ _| | | 2 2 0
%e 7 _| | | 1 1 0
%e 8 _ _ _ _| | 4 8 -4
%e 9 _| | | | 1 1 0
%e 10 _ _| | | 2 2 0
%e 11 _| | | 1 1 0
%e 12 _ _ _| | 3 4 -1
%e 13 _| | | 1 1 0
%e 14 _ _| | 2 2 0
%e 15 _| | 1 1 0
%e 16 _ _ _ _ _| 5 16 -11
%e .
%e Written as an array read by rows with four columns the first three columns contain only zeros.
%e 0, 0, 0, -1;
%e 0, 0, 0, -4;
%e 0, 0, 0, -1;
%e 0, 0, 0, -11;
%e 0, 0, 0, -1;
%e 0, 0, 0, -4;
%e 0, 0, 0, -1;
%e 0, 0, 0, -26;
%e ...
%e Written as a triangle T(j,k) the sequence begins:
%e 0;
%e 0;
%e 0,-1;
%e 0,0,0,-4;
%e 0,0,0,-1,0,0,0,-11;
%e 0,0,0,-1,0,0,0,-4,0,0,0,-1,0,0,0,-26;
%e 0,0,0,-1,0,0,0,-4,0,0,0,-1,0,0,0,-11,0,0,0,-1,0,0,0,-4,0, 0,0,-1,0,0,0,-57;
%e ...
%e Row lengths give A011782.
%o (Python)
%o def A228368(n): return (m:=n&-n).bit_length()-m # _Chai Wah Wu_, Jul 14 2022
%Y Cf. A001511, A006519, A011782, A141285, A194446, A194447, A228366, A228367, A228525.
%K sign,tabf
%O 1,8
%A _Omar E. Pol_, Aug 22 2013