Finding the number of arrangements of $n$ binary elements ($a$, $b$) with a maximum of $k$ repeating consecutive elements of one type
Number of occurrences of k consecutive 1's in a binary string of length n (containing only 1's and 0's)