Solution (source code)

= Solution

Under the <null hypothesis>, $Y\sim\operatorname{Bin}(n,1/2)$, with <expected value> $n/2$ and <variance> $n/4$. Approximating its probability at an integer by the <normal distribution> density over a unit-width cell gives
$$
p(y\mid H_0)\approx\frac1{\sqrt{2\pi(n/4)}}\exp\left[-\frac{(y-n/2)^2}{2(n/4)}\right]
=\sqrt{\frac2{\pi n}}\exp\left[-\frac2n(y-n/2)^2\right].
$$
Dividing by the <prior predictive distribution> from the preceding part gives the <uniform-alternative binomial Bayes factor>
$$
B_{01}(y)\approx(n+1)\sqrt{\frac2{\pi n}}\exp\left[-\frac2n(y-n/2)^2\right]
\approx\boxed{\sqrt{\frac{2n}{\pi}}\exp\left[-\frac2n(y-n/2)^2\right]}.
$$
The second approximation replaces $n+1$ by $n$. Both are large-sample approximations for counts in the central range, rather than exact identities at extreme counts.