Problem
COM-B1-M11-P023 No Three Zeros
#23
★★★★☆ Level 4 of 5
How many binary strings of length \(9\) contain no three consecutive zeros?
The final block may be \(1\), \(01\), \(001\).
Let \(a_n\) be the number of strings. Then \(a_n=a_{n-1}+a_{n-2}+a_{n-3}\), with \(a_0=1\), \(a_1=2\), \(a_2=4\). We get \(a_3=7\), \(a_4=13\), \(a_5=24\), \(a_6=44\), \(a_7=81\), \(a_8=149\), \(a_9=274\).
Recurrence with three final-block cases.