Solution (source code)

= Solution

Let $Z_n$ be the size of generation $n$. This is a <Galton-Watson process> with offspring mean
$$
m=0\cdot\frac1{12}+1\cdot\frac12
+2\cdot\frac13+3\cdot\frac1{12}
=\frac{17}{12}.
$$
The <expected generation size in a Galton-Watson process> is therefore
$$
\boxed{\mathbb E Z_n=\left(\frac{17}{12}\right)^n}.
$$
Its <probability generating function> is
$$
G(s)=\frac1{12}+\frac12s+\frac13s^2+\frac1{12}s^3.
$$
By the <Galton-Watson extinction fixed point>, the extinction probability $q$ is the smallest solution in $[0,1]$ of $G(q)=q$. Factoring gives
$$
q^3+4q^2-6q+1=(q-1)(q^2+5q-1)=0,
$$
so $q=(\sqrt{29}-5)/2$. The probability of production continuing forever is
$$
\boxed{1-q=\frac{7-\sqrt{29}}2}.
$$