Solution (source code)

= Solution

Assume independent physical-qubit errors with common <probability> $p$, ideal encoding and recovery, and the specified rule that every block with two or more errors fails. The number of physical errors has a <binomial distribution> with parameters $5,p$. Correct recovery occurs for zero or one error, so
$$
\boxed{P_{\mathrm{correct}}=(1-p)^5+5p(1-p)^4=(1-p)^4(1+4p).}
$$
The corresponding logical failure <probability> is
$$
f(p)=1-P_{\mathrm{correct}}=10p^2-20p^3+15p^4-4p^5.
$$
An unencoded <qubit> succeeds with <probability> $1-p$. Thus encoding improves this <probability> precisely when $f(p)<p$. Factoring gives
$$
f(p)-p=p(1-p)(4p^3-11p^2+9p-1).
$$
On $0<p<1$, the sign is the sign of $g(p)=4p^3-11p^2+9p-1$. Its derivative is $12p^2-22p+9$: it is positive until $(11-\sqrt{13})/12$ and negative afterwards on $[0,1]$. Since $g(0)=-1$, $g(1)=1$ and its interior maximum is positive, there is exactly one zero in $(0,1)$. The <five-qubit concatenation threshold> is therefore
$$
\boxed{4p_*^3-11p_*^2+9p_*-1=0,\qquad p_*\simeq0.1311231479,\qquad 0<p<p_*\ \text{improves recovery}.}
$$
At $p=p_*$ the two success <probabilities> agree; above it this decoder makes the error rate worse. At $p=0$ both schemes succeed perfectly, and at $p=1$ both fail under the stated error model. The small-$p$ behavior $f(p)=10p^2+O(p^3)$ exhibits cancellation of every single-qubit-error contribution.