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.

A319650 a(n) = A073138(n) - n.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 0, 0, 0, 3, 2, 3, 0, 1, 0, 0, 0, 7, 6, 9, 4, 7, 6, 7, 0, 3, 2, 3, 0, 1, 0, 0, 0, 15, 14, 21, 12, 19, 18, 21, 8, 15, 14, 17, 12, 15, 14, 15, 0, 7, 6, 9, 4, 7, 6, 7, 0, 3, 2, 3, 0, 1, 0, 0, 0, 31, 30, 45, 28, 43, 42, 49, 24, 39, 38, 45, 36, 43, 42, 45, 16
Offset: 0

Views

Author

Seiichi Manyama, Sep 25 2018

Keywords

Crossrefs

Programs

  • PARI
    a(n) = fromdigits(vecsort(binary(n),,4), 2) - n; \\ Michel Marcus, Sep 25 2018
  • Ruby
    def A(k, n)
      (0..n).map{|i| i.to_s(k).split('').sort.reverse.join.to_i(k) - i}
    end
    p A(2, 100)