A228368 Difference between the n-th element of the ruler function and the highest power of 2 dividing n.
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, 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, 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
Offset: 1
Examples
Illustration of initial terms (n = 1..16): ----------------------------------------------- . Largest Number of . Diagram of part of parts of . compositions region n region n ----------------------------------------------- n A001511(n) A006519(n) a(n) ----------------------------------------------- . 1 _| | | | | 1 1 0 2 _ _| | | | 2 2 0 3 _| | | | 1 1 0 4 _ _ _| | | 3 4 -1 5 _| | | | 1 1 0 6 _ _| | | 2 2 0 7 _| | | 1 1 0 8 _ _ _ _| | 4 8 -4 9 _| | | | 1 1 0 10 _ _| | | 2 2 0 11 _| | | 1 1 0 12 _ _ _| | 3 4 -1 13 _| | | 1 1 0 14 _ _| | 2 2 0 15 _| | 1 1 0 16 _ _ _ _ _| 5 16 -11 . Written as an array read by rows with four columns the first three columns contain only zeros. 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; ... Written as a triangle T(j,k) the sequence begins: 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; 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; ... Row lengths give A011782.
Links
- Antti Karttunen, Table of n, a(n) for n = 1..65537
Programs
-
Python
def A228368(n): return (m:=n&-n).bit_length()-m # Chai Wah Wu, Jul 14 2022
Comments