OFFSET
1,2
COMMENTS
FORMULA
Let, for k_1>k_2>...>k_r, A233564(n) = 2^k_1 + 2^k_2 +...+ 2^k_r. Then a(n) = 2^(k_1-k_2-1) + 2^(k_2-k_3-1) + 2^(k_(r-1)-k_r-1) + 2^k_r.
EXAMPLE
Let n=17, A233564(17)=37. In binary a concatenation of parts of the form 10...0 which gives 37 is (100)(10)(1). Thus a(17)= 4+2+1 = 7.
MATHEMATICA
bitPatt[n_]:=bitPatt[n]=Split[IntegerDigits[n, 2], #2==0&]; Map[Plus@@(Map[FromDigits[#, 2]&, bitPatt[#]])&, Select[Range[300], #==DeleteDuplicates[#]&[bitPatt[#]]&]] (* Peter J. C. Moses, Jan 15 2014 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Vladimir Shevelev, Jan 12 2014
STATUS
approved