Counting binary strings of length n with no two adjacent 1's I need to calculate the total number of possible binary strings of length $n$ with no two adjacent 1's.
Eg.
for n = 3
f(n) = 5
000,001,010,100,101

How do I solve it?

Mathematical Proof:
Let B(n) give the count of binary sequences of length n without adjacent 1's.
B(0) = 1 //There is exactly one way to list 0 items.
B(1) = 2 //It's either a 0 or a 1.
Now consider the addition of an nth digit.
If the nth digit is 0, it may be follow any legal sequence of length (n-1)
If the nth digit is 1, then the (n-1)th digit must be a 0. These sequences can all be obtained by taking every sequence of length (n-2) and appending a 0.
Therefore: B(n) = B(n-1) + B(n-2)
