%I #13 Jan 10 2017 07:52:36
%S 0,1,10,11,100,110,110,111,1000,1100,1100,1110,1100,1110,1110,1111,
%T 10000,11000,11000,11100,11000,11100,11100,11110,11000,11100,11100,
%U 11110,11100,11110,11110,11111,100000,110000,110000,111000,110000
%N Numbers written in base 2 with digits rearranged to be in decreasing order.
%C This is the base-2 equivalent of A004186.
%H Indranil Ghosh, <a href="/A221714/b221714.txt">Table of n, a(n) for n = 0..10000</a>
%t a[n_] := FromDigits[-Sort[-IntegerDigits[n, 2]]] (* _Giovanni Resta_, Jan 27 2013 *)
%o (Python)
%o def a(n):
%o return "".join(sorted(bin(n)[2:],reverse=True)) # _Indranil Ghosh_, Jan 09 2017
%Y For decimal equivalents see A073138.
%Y Cf. A004086, A004185, A004186, A009996.
%K nonn,base,easy
%O 0,3
%A Bruce L. Rothschild and _N. J. A. Sloane_, Jan 26 2013
%E a(18)-a(36) from _Giovanni Resta_, Jan 27 2013
|