A298072 Number of binary strings of length n that are "prefix heavy", meaning that the fraction of "1" bits in any nonempty prefix is at least as great as the fraction of "1" bits in the entire string.
1, 2, 3, 4, 6, 8, 15, 20, 40, 64, 126, 188, 434, 632, 1391, 2428, 4826, 7712, 17744, 27596, 62468, 106934, 220288, 364724, 834200, 1384470, 2954760, 5187588, 11085712, 18512792, 42379925, 69273668, 152600856, 268881898, 570336966, 1023023000, 2205306276
Offset: 0
Keywords
Examples
For n=2, the a(2)=3 prefix heavy strings of length 2 are 00, 10, and 11, because each prefix of nonzero length is constituted of at least 0%, 50%, or 100% "1" bits, respectively. For n=6, the a(6)=15 prefix heavy strings of length 6 are 000000, 100000, 100100, 101000, 101010, 101100, 110000, 110010, 110100, 110110, 111000, 111010, 111100, 111110, and 111111.
Links
- Lee A. Newberg, R code and Table of n, a(n) for n = 0..1024
Formula
Extensions
a(28)-a(36) from Alois P. Heinz, Jan 11 2018
Comments