cp's OEIS Frontend

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.

A221714 Numbers written in base 2 with digits rearranged to be in decreasing order.

Original entry on oeis.org

0, 1, 10, 11, 100, 110, 110, 111, 1000, 1100, 1100, 1110, 1100, 1110, 1110, 1111, 10000, 11000, 11000, 11100, 11000, 11100, 11100, 11110, 11000, 11100, 11100, 11110, 11100, 11110, 11110, 11111, 100000, 110000, 110000, 111000, 110000
Offset: 0

Views

Author

Bruce L. Rothschild and N. J. A. Sloane, Jan 26 2013

Keywords

Comments

This is the base-2 equivalent of A004186.

Crossrefs

For decimal equivalents see A073138.

Programs

  • Maple
    a:= n-> parse(cat(0, sort(Bits[Split](n), `>`)[])):
    seq(a(n), n=0..36);  # Alois P. Heinz, Aug 18 2025
  • Mathematica
    a[n_] := FromDigits[-Sort[-IntegerDigits[n, 2]]] (* Giovanni Resta, Jan 27 2013 *)
  • Python
    def a(n):
         return "".join(sorted(bin(n)[2:],reverse=True)) # Indranil Ghosh, Jan 09 2017
    
  • Python
    def A221714(n): return int(bin((m:=1<>n.bit_count()))[2:]) # Chai Wah Wu, Aug 18 2025

Extensions

a(18)-a(36) from Giovanni Resta, Jan 27 2013