cp's OEIS Frontend

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.

A228368 Difference between the n-th element of the ruler function and the highest power of 2 dividing n.

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