Solution
= Solution
Let $n$ be the sample size in each arm, $\pi_{1A}=\pi_0+\delta_A$, and $\bar\pi_A=(\pi_{1A}+\pi_0)/2$. Solving the normal-approximation power equation gives
$$
n=\frac{
\left[z_{1-\alpha}\sqrt{2\bar\pi_A(1-\bar\pi_A)}
+z_{1-\beta}\sqrt{\pi_{1A}(1-\pi_{1A})+\pi_0(1-\pi_0)}\right]^2
}{\delta_A^2},
$$
rounded upward. The total sample size is $2n$.