A277017 Number of maximal runs of 1-bits (in binary expansion of n) such that the length of run >= A000040(1 + the total number of zeros to the right of that run).
0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 2, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 2, 0
Offset: 0
Examples
For n=3, "11" in binary, the only maximal run of 1-bits is of length 2, and 2 >= prime(0+1) (where 0 is the total number of zeros to the right of it), thus a(3) = 1. For n=59, "111011" in binary, both the length of run "11" at the least significant end exceeds the limit (see case n=3 above), and also the length of run "111" >= prime(1 + the total number of 0's to the right of it) = prime(2) = 3, thus a(59) = 1+1 = 2. For n=60, "111100" in binary, the length of only run of 1's is 4, and 4 < prime(2+1) = 5, thus a(60) = 0.
Comments