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.

A195065 Numbers n such that BCR(n) is greater than n, where BCR = binary-complement-and-reverse = A036044.

Original entry on oeis.org

0, 4, 8, 16, 18, 20, 24, 32, 34, 36, 40, 44, 48, 64, 66, 68, 70, 72, 74, 76, 80, 82, 84, 88, 92, 96, 100, 104, 112, 128, 130, 132, 134, 136, 138, 140, 144, 146, 148, 152, 154, 156, 160, 162, 164, 168, 172, 176, 180, 184, 188, 192, 196, 200, 208, 216, 224
Offset: 1

Views

Author

Reinhard Zumkeller, Sep 16 2011

Keywords

Comments

A035928(a(n)) > n.

Crossrefs

Complement of A195064; subsequence of A195066.

Programs

  • Haskell
    a195065 n = a195065_list !! (n-1)
    a195065_list = filter (\x -> a036044 x > x) [0,2..]
    
  • Python
    def comp(s): z, o = ord('0'), ord('1'); return s.translate({z:o, o:z})
    def BCR(n): return int(comp(bin(n)[2:])[::-1], 2)
    def aupto(limit): return [m for m in range(limit+1) if BCR(m) > m]
    print(aupto(224)) # Michael S. Branicky, Jun 14 2021