OFFSET
1,2
COMMENTS
Two numbers n_1 and n_2 are called c-equivalent (n_1~n_2) if in binary they have the same parts of the form 10...0 with k>=0 zeros up to a permutation of them. For example, 6~5, 14~13~11, 12~9.
EXAMPLE
A047778(4)=220 which has parts (1)(10)(1)(1)(100)~(100)(10)(1)(1)(1) which is 151 in decimal. So, a(4)=151.
MATHEMATICA
bitPatt[n_]:=bitPatt[n]=Split[IntegerDigits[n, 2], #1>#2||#2==0&]; Map[FromDigits[Flatten[Reverse[Sort[bitPatt[FromDigits[Flatten[Map[IntegerDigits[#, 2]&, Range[#]]], 2]]]]], 2]&, Range[20]] (* Peter J. C. Moses, Dec 14 2013 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Vladimir Shevelev, Dec 13 2013
STATUS
approved