This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A221714 #17 Aug 18 2025 20:39:26 %S A221714 0,1,10,11,100,110,110,111,1000,1100,1100,1110,1100,1110,1110,1111, %T A221714 10000,11000,11000,11100,11000,11100,11100,11110,11000,11100,11100, %U A221714 11110,11100,11110,11110,11111,100000,110000,110000,111000,110000 %N A221714 Numbers written in base 2 with digits rearranged to be in decreasing order. %C A221714 This is the base-2 equivalent of A004186. %H A221714 Indranil Ghosh, <a href="/A221714/b221714.txt">Table of n, a(n) for n = 0..10000</a> %p A221714 a:= n-> parse(cat(0, sort(Bits[Split](n), `>`)[])): %p A221714 seq(a(n), n=0..36); # _Alois P. Heinz_, Aug 18 2025 %t A221714 a[n_] := FromDigits[-Sort[-IntegerDigits[n, 2]]] (* _Giovanni Resta_, Jan 27 2013 *) %o A221714 (Python) %o A221714 def a(n): %o A221714 return "".join(sorted(bin(n)[2:],reverse=True)) # _Indranil Ghosh_, Jan 09 2017 %o A221714 (Python) %o A221714 def A221714(n): return int(bin((m:=1<<n.bit_length())-(m>>n.bit_count()))[2:]) # _Chai Wah Wu_, Aug 18 2025 %Y A221714 For decimal equivalents see A073138. %Y A221714 Cf. A004086, A004185, A004186, A009996. %K A221714 nonn,base,easy %O A221714 0,3 %A A221714 Bruce L. Rothschild and _N. J. A. Sloane_, Jan 26 2013 %E A221714 a(18)-a(36) from _Giovanni Resta_, Jan 27 2013