Read binary expansion of n from the left; keep track of the excess of 1's over 0's that have been seen so far; sequence gives maximum(excess of 1's over 0's).
A126387
Read binary expansion of n from the left; keep track of the excess of 1's over 0's that have been seen so far; sequence gives maximum(excess of 1's over 0's).
Terms
- a(0) =0a(1) =1a(2) =1a(3) =2a(4) =1a(5) =1a(6) =2a(7) =3a(8) =1a(9) =1a(10) =1a(11) =2a(12) =2a(13) =2a(14) =3a(15) =4a(16) =1a(17) =1a(18) =1a(19) =1a(20) =1a(21) =1a(22) =2a(23) =3a(24) =2a(25) =2a(26) =2a(27) =3a(28) =3a(29) =3
External references
- oeis: A126387