A057520 a(n) = A014486(n)/2. In binary expansion there is one more 1 than 0 and reading from the left (the most significant bit) to right, the number of 0's never exceed the number of 1's.
0, 1, 5, 6, 21, 22, 25, 26, 28, 85, 86, 89, 90, 92, 101, 102, 105, 106, 108, 113, 114, 116, 120, 341, 342, 345, 346, 348, 357, 358, 361, 362, 364, 369, 370, 372, 376, 405, 406, 409, 410, 412, 421, 422, 425, 426, 428, 433, 434, 436, 440, 453, 454, 457, 458, 460
Offset: 0
Keywords
Links
- Harvey P. Dale, Table of n, a(n) for n = 0..2000
Crossrefs
Cf. A014486.
Programs
-
Mathematica
Join[{0},Select[Range[500],With[{id=IntegerDigits[#,2]/.(0->-1)},Total[id] == 1&&Min[Accumulate[id]]>=0]&]] (* Harvey P. Dale, Dec 31 2021 *)