OFFSET
1,3
COMMENTS
If the representation of a(n) in base 2 contains the k-th bit (2^k), then it must contain the bits of k.
A034797 is a subsequence, and can be seen as a recursive variant of this sequence. - Rémy Sigrist, Jul 25 2019
LINKS
EXAMPLE
23 is in the sequence because 23 = 2^4 + 2^2 + 2^1 + 2^0 encodes the transitive set {0,1,{1},{{1}}} (remember that 0 is the empty set and 1 is {0}).
MATHEMATICA
b[n_] := (Flatten @ Position[Reverse[IntegerDigits[n, 2]], 1] - 1);
okQ[n_] := With[{bb = b[n]}, AllTrue[b /@ bb, Intersection[bb, #] == #&]];
Select[Range[0, 600], okQ] (* Jean-François Alcover, Jul 25 2019 *)
PROG
(PARI) is(n) = { for (b=0, #binary(n), if (bittest(n, b), if (bitand(n, b)!=b, return (0)))); return (1) } \\ Rémy Sigrist, Jul 25 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
Christophe Papazian, Jul 24 2019
STATUS
approved