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.

A335042 Numbers whose binary representation encodes a (binary) max-heap on elements from the set {0,1} with root at the most significant bit and a min-heap with root at the least significant bit.

Original entry on oeis.org

0, 1, 2, 3, 4, 6, 7, 8, 10, 12, 14, 15, 16, 20, 24, 26, 28, 30, 31, 32, 40, 48, 52, 56, 58, 60, 62, 63, 64, 80, 96, 100, 104, 108, 112, 116, 120, 122, 124, 126, 127, 128, 160, 192, 200, 208, 216, 224, 228, 232, 236, 240, 244, 248, 250, 252, 254, 255, 256, 320
Offset: 1

Views

Author

Alois P. Heinz, May 20 2020

Keywords

Comments

All odd terms are in A000225.

Crossrefs

Cf. A000225 (subsequence), A335039, A335040, A335041.

Programs

  • Maple
    q:= proc(n) local i, l; l:= convert(n, base, 2);
          for i from 2 to nops(l) do if (h-> l[i]l[-h])(iquo(i, 2)) then return false fi
          od; true
        end:
    a:= proc(n) option remember; local k: for k from 1+
          `if`(n=1, -1, a(n-1)) while not q(k) do od; k
        end:
    seq(a(n), n=1..62);

Formula

{ A335040 } intersect { A335041 }.