login
Weight of the set-system with BII-number n.
133

%I #18 Jun 08 2024 01:48:17

%S 0,1,1,2,2,3,3,4,1,2,2,3,3,4,4,5,2,3,3,4,4,5,5,6,3,4,4,5,5,6,6,7,2,3,

%T 3,4,4,5,5,6,3,4,4,5,5,6,6,7,4,5,5,6,6,7,7,8,5,6,6,7,7,8,8,9,3,4,4,5,

%U 5,6,6,7,4,5,5,6,6,7,7,8,5,6,6,7,7,8,8,9

%N Weight of the set-system with BII-number n.

%C A binary index of n is any position of a 1 in its reversed binary expansion. We define the set-system with BII-number n to be obtained by taking the binary indices of each binary index of n. Every finite set of finite nonempty sets of positive integers has a different BII-number. For example, 18 has reversed binary expansion (0,1,0,0,1), and since the binary indices of 2 and 5 are {2} and {1,3} respectively, it follows that the BII-number of {{2},{1,3}} is 18. The weight of a set-system is the sum of sizes of its elements (sometimes called its edges).

%H John Tyler Rascoe, <a href="/A326031/b326031.txt">Table of n, a(n) for n = 0..8192</a>

%F a(2^x + ... + 2^z) = w(x + 1) + ... + w(z + 1), where x...z are distinct nonnegative integers and w = A000120. For example, a(6) = a(2^2 + 2^1) = w(3) + w(2) = 3.

%e The sequence of set-systems together with their BII-numbers begins:

%e 0: {}

%e 1: {{1}}

%e 2: {{2}}

%e 3: {{1},{2}}

%e 4: {{1,2}}

%e 5: {{1},{1,2}}

%e 6: {{2},{1,2}}

%e 7: {{1},{2},{1,2}}

%e 8: {{3}}

%e 9: {{1},{3}}

%e 10: {{2},{3}}

%e 11: {{1},{2},{3}}

%e 12: {{1,2},{3}}

%e 13: {{1},{1,2},{3}}

%e 14: {{2},{1,2},{3}}

%e 15: {{1},{2},{1,2},{3}}

%e 16: {{1,3}}

%e 17: {{1},{1,3}}

%e 18: {{2},{1,3}}

%e 19: {{1},{2},{1,3}}

%e 20: {{1,2},{1,3}}

%t bpe[n_]:=Join@@Position[Reverse[IntegerDigits[n,2]],1];

%t Table[Length[Join@@bpe/@bpe[n]],{n,0,100}]

%o (Python)

%o def bin_i(n): #binary indices

%o return([(i+1) for i, x in enumerate(bin(n)[2:][::-1]) if x =='1'])

%o def A326031(n): return sum(i.bit_count() for i in bin_i(n)) # _John Tyler Rascoe_, Jun 08 2024

%Y Cf. A000120, A029931, A048793, A061775, A070939, A072639, A116549, A302242, A305830, A326701, A326702, A326703, A326704.

%K nonn,base

%O 0,4

%A _Gus Wiseman_, Jul 20 2019