title: How to find the number of binary numbers with the following constraints:
body: <p>Given a binary digit count of n, and a maximum consecutive occurrence count of m, find the number of different possible binary numbers. Also, the leftmost and rightmost bit must be 1.</p>
  
  <p>For example n = 5, and m = 3.</p>
  
  <p>The count is 7:
  10001
  10011
  10101
  10111
  11001
  11011
  11101</p>
  
  <p>Notice we excluded 11111 because too many consecutive 1's exist in it.</p>
  
  <p>This was an interview question I had recently, and It has been bothering me. I don't want to brute force check each number for legitimacy because n can be > 32.</p>