login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A335039 Numbers whose binary representation encodes a (binary) max-heap on elements from the set {0,1} with root at the least significant bit. 4
0, 1, 3, 5, 7, 11, 15, 19, 23, 27, 31, 37, 39, 47, 55, 63, 69, 71, 79, 87, 95, 101, 103, 111, 119, 127, 139, 143, 155, 159, 175, 191, 207, 223, 239, 255, 267, 271, 283, 287, 303, 319, 335, 351, 367, 383, 395, 399, 411, 415, 431, 447, 463, 479, 495, 511, 531 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
COMMENTS
All positive terms are odd.
LINKS
Eric Weisstein's World of Mathematics, Heap
Wikipedia, Binary heap
MAPLE
q:= proc(n) local i, l; l:= convert(n, base, 2);
for i from 2 to nops(l) do
if l[i]>l[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..59);
CROSSREFS
Cf. A000225 (subsequence), A335040, A335041, A335042.
Sequence in context: A059748 A122124 A219655 * A007665 A208994 A194602
KEYWORD
nonn,base
AUTHOR
Alois P. Heinz, May 20 2020
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 22:17 EDT 2024. Contains 371964 sequences. (Running on oeis4.)