Derivation (Helmholtz and Maxwell coils)
$$ \begin{align*} B(z) = \frac{\mu_0 I R^2}{2(R^2 + z^2)^{3/2}}. \end{align*} $$ With the Helmholtz configuration, we need to pick $a$ to make $$ \begin{align*} B_{net}(z) = B(z) + B(z-a). \end{align*} $$ almost uniform around $a/2$.
$B_{net}' = 0$ automatically at the midpoint. To get $B_{net}'' = 0$, we need $B'' = 0$: $$ \begin{align*} B'(z) &= -\frac{3}{2}\frac{\mu_0 I R^2 z}{(R^2+z^2)^{5/2}} \\ B''(z) &= -\frac{3\mu_0 I R^2}{2}\frac{(R^2+z^2)^{5/2} - 5(R^2+z^2)^{3/2} z^2}{(R^2+z^2)^5} \\ &= -\frac{3\mu_0 I R^2}{2}\frac{R^2- 4z^2}{(R^2+z^2)^{7/2}} \end{align*} $$ so $B''(R/2) = 0$. Therefore we choose $a=R$.
With Maxwell configuration, we need to pick $a$ such that $$ \begin{align*} B_{net}(z) = B(z) - B(z-a) \end{align*} $$ has almost constant gradient around $a/2$.
$B_{net}=B_{net}'' = 0$ automatically. To get $B_{net}''' = 0$, we need $B''' = 0$: $$ \begin{align*} B'''(z) &= -\frac{3\mu_0 IR^2}{2}\frac{(R^2+z^2)^{7/2}(-8z) - 7z(R^2 - 4z^2)(R^2+z^2)^{5/2}}{(R^2+z^2)^7} \\ &= -\frac{3\mu_0 IR^2}{2} \frac{-8R^2z - 8z^3 - 7R^2 z + 28z^3}{(R^2+z^2)^{9/2}} \\ &= -\frac{15\mu_0 IR^2}{2} \frac{z(4z^2 - 3R^2)}{(R^2+z^2)^{9/2}} \end{align*} $$ so $B'''(\sqrt{3}R/2) = 0$. Therefore we choose $a = \sqrt{3}R$.