Fraction of length-$n$ binary numbers satisfying a constraint Problem:  Derive an expression for the fraction of length-$n$ binary numbers that do not contain the subsequence $010$.  
Background:  The total number of $n$-bit binary numbers is of course $2^n$.  Some of these numbers have the sequence $010$ within it; others do not.  In short, the problem is to determine, for a given $n$:
${{\rm number\ of\ sequences\ without\ 010} \over 2^n}$.
Although it is a simple matter to determine this fraction through simulation and curve fitting, it is rather tricky to determine the fraction through combinatorics or other rigorous means.
Clearly for $n=3$, there are $2^3 = 8$ possible binary numbers of length $3$ and only one of them is $010$.  Thus for $n=3$, the fraction is:
${7 \over 8}$.
Background reading:  Binary strings without zigzags and a related question.

I upvoted the answer by @Joriki which is exemplary.
This can also be done using generating functions.
We get
$$G(z) = \frac{1}{1-z} + \frac{1}{1-z} \frac{z}{1-z} 
\sum_{q\ge 0} \left(\frac{z^2}{1-z}\frac{z}{1-z}\right)^q
\frac{1}{1-z}.$$
Explanation: first term  a string of ones.  Remaining term: admissible
sequences containing at least one zero. This is
$$1^* 0^+ (11^+ 0^+)^* 1^*.$$
We thus obtain
$$G(z) = \frac{1}{1-z}
+ \frac{z}{(1-z)^3} \frac{1}{1-z^3/(1-z)^2}
= \frac{1}{1-z}
+ \frac{z}{1-z} \frac{1}{1-2z+z^2-z^3}
\\ = \frac{z+1-2z+z^2-z^3}{1-z} \frac{1}{1-2z+z^2-z^3}
= \frac{1-z+z^2-z^3}{1-z} \frac{1}{1-2z+z^2-z^3}
\\ = \frac{1+z^2}{1-2z+z^2-z^3}.$$
Now the dominant contribution  (the asymptotical factor being sought)
emerges from the inverses of the poles, i.e. the roots of
$$z^3(1-2/z+1/z^2+1/z^3) = z^3-2z^2+z-1.$$
Using a computer algebra system we find the dominant root to be
$$1.754877667$$
and the rest continues as before.

The dominant contribution emerges from  the inverses because the poles
are all simple and hence we have
$$\frac{1+z^2}{1-2z+z^2-z^3}
= \sum_{1-2\rho+\rho^2-\rho^3 = 0}
 \frac{1}{z-\rho} \mathrm{Res}_{z=\rho} \frac{1+z^2}{1-2z+z^2-z^3}$$
and
$$\frac{1}{z-\rho} = - \frac{1}{\rho} \frac{1}{1-z/\rho}.$$
