OFFSET
1,3
COMMENTS
Equivalently, numbers whose binary expansions encode union-closed finite sets of finite sets of nonnegative integers:
- the encoding is based on a double application of A133457,
- for example: 11 -> {0, 1, 3} -> {{}, {0}, {0, 1}},
- a union-closed set f satisfies: for any i and j in f, the union of i and j belongs to f.
For any k >= 0, 2*k belongs to the sequence iff 2*k+1 belongs to the sequence.
This sequence has similarities with A190939; here we consider the bitwise OR operator, there the bitwise XOR operator.
This sequence is infinite as it contains the powers of 2.
LINKS
EXAMPLE
The first terms, alongside the corresponding union-closed sets, are:
n a(n) Union-closed set
---- ----- ----------------------
1 0 {}
2 1 {{}}
3 2 {{0}}
4 3 {{}, {0}}
5 4 {{1}}
6 5 {{}, {1}}
7 8 {{0, 1}}
8 9 {{}, {0, 1}}
9 10 {{0}, {0, 1}}
10 11 {{}, {0}, {0, 1}}
11 12 {{1}, {0, 1}}
12 13 {{}, {1}, {0, 1}}
13 14 {{0}, {1}, {0, 1}}
14 15 {{}, {0}, {1}, {0, 1}}
15 16 {{2}}
16 17 {{}, {2}}
17 32 {{0, 2}}
PROG
(PARI) is(n) = { my (b=vector(hammingweight(n))); for (i=1, #b, n -= 2^b[i] = valuation(n, 2)); setbinop(bitor, b)==b }
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Jan 04 2023
STATUS
approved