Sum a product of Bernoulli numbers and binomial coefficients Context: I am interested in developing the large-$x$ asymptotic series of the digamma function
$$\psi\Big(\frac{1}{2}+ix\Big)$$
for real positive $x$.
For this I am using the known asymptotic expansion of $\psi(x)$:
$$\psi(z) \sim \ln z - \frac{1}{2z} - \sum_{n=1}^\infty \frac{B_{2n}}{2n z^{2n}}, \qquad z\rightarrow \infty$$
where $B_{2n}$ are the Bernoulli numbers, in conjunction with the generalized binomial expansion for negative powers:
$$\frac{1}{(1+y)^p} = \sum_{n=0}^\infty \begin{pmatrix}-p\\n\end{pmatrix} y^n$$.
Question:  In the process of applying the binomial expansions to the third term of the large $x$ behavior of the digamma function, I end up with the following double sum:
$$S = -\sum_{d=2}^\infty \Big(\sum_{n=1}^{\lfloor d/2 \rfloor} \frac{B_{2n}}{2n} \begin{pmatrix}-2n\\d-2n\end{pmatrix}2^{2n}\Big)\big(\frac{-i}{2x}\big)^d$$
What is the closed-form formula for the inner $n$-sum, for $d$ odd and for $d$ even?  I believe this should be possible since the odd $d$ case leads to a series that is purely imaginary which (I observe by explicit computation of the first few terms) exactly cancels the imaginary part arising from the expansion of $\ln(z) - \frac{1}{2z}$.  I am therefore able to guess
$$-\sum_{n=1}^{\lfloor d/2 \rfloor} \frac{B_{2n}}{2n} \begin{pmatrix}-2n\\d-2n\end{pmatrix}2^{2n} = 1-\frac{1}{d},\qquad d = \{3,5,7,\ldots\}$$

*

*How can I prove this relation? And what is the closed-form result for $d$ even and positive?

*Bonus: what is the large $x$ behavior of $\psi(\frac{1}{2}+ix)$?

 A: We seek to evaluate
$$\sum_{q=1}^{\lfloor n/2\rfloor} \frac{B_{2q}}{2q}
{-2q\choose n-2q} 2^{2q}.$$
Taking advantage of the odd index Bernoulli numbers being zero except
$B_1$ this is
$$(-1)^{n+1} + \sum_{q=1}^n \frac{B_{q}}{q}
{-q\choose n-q} 2^q.$$
Now with the binomial coefficient we get
$$(-q)^{\underline{n-q}}/(n-q)! =
(-1)^{n-q} (n-1)^{\underline{n-q}}/(n-q)! =
(-1)^{n-q} {n-1\choose n-q}.$$
Continuing,
$$(-1)^{n+1} +
\sum_{q=1}^n \frac{B_q}{q} (-1)^{n-q} {n-1\choose q-1} 2^q
= (-1)^{n+1} +
\frac{1}{n} \sum_{q=1}^n B_q (-1)^{n-q} {n\choose q} 2^q
\\ = (-1)^{n+1} + \frac{1}{n} (-1)^{n+1}
+ \frac{1}{n} \sum_{q=0}^n B_q (-1)^{n-q} {n\choose q} 2^q
\\ = (-1)^{n+1} \frac{n+1}{n}
+ (n-1)! [z^n] \exp(-z) \frac{2z}{\exp(2z)-1}.$$
Now we have
$$\frac{2}{\exp(2z)-1} =
\frac{1}{\exp(z)-1} - \frac{1}{\exp(z)+1}$$
as well as
$$\frac{1}{\exp(z)} \frac{1}{\exp(z)-1}
= \frac{1}{\exp(z)-1} - \frac{1}{\exp(z)}$$
and
$$\frac{1}{\exp(z)} \frac{1}{\exp(z)+1}
= - \frac{1}{\exp(z)+1} + \frac{1}{\exp(z)}$$
which yields for the sum
$$(-1)^{n+1} \frac{n+1}{n}
+ (n-1)! [z^n]
\left[\frac{z}{\exp(z)-1} + \frac{z}{\exp(z)+1}
- \frac{2z}{\exp(z)} \right]$$
or
$$(-1)^{n+1} \frac{1-n}{n}
+ \frac{1}{n} B_n
+ (n-1)! [z^n] \frac{z}{\exp(z)+1}.$$
Observe that
$$\frac{z}{\exp(z)+1}
= \frac{z}{\exp(z)-1} - \frac{2z}{\exp(2z)-1}$$
This will produce at last
$$(-1)^{n+1} \frac{1-n}{n}
+ \frac{1}{n} B_n
+ \frac{1}{n} B_n - \frac{1}{n} 2^n B_n$$
or alternatively
$$\bbox[5px,border:2px solid #00A000]{
(-1)^{n+1} \frac{1-n}{n} +
\frac{1}{n} (2-2^n) B_n.}$$
Again with the Bernoulli numbers at odd indices being zero we get for
$n\ge 3$, $n$ odd the closed form
$$\bbox[5px,border:2px solid #00A000]{
\frac{1-n}{n}.}$$
Here we have consulted OEIS A036968, the
Genocchi  numbers.
A: About your second question. The rays $\arg z =\pm \frac{\pi}{2}$ are Stokes lines for $\log \Gamma \!\left( {\frac{1}{2} + z} \right)$ and $\psi\!\left( {\frac{1}{2} + z} \right)$, where exponentially small contributions are "switched on". It is known that
\begin{align*}
\log \Gamma\! \left( {\tfrac{1}{2} + ix} \right) \sim ix\log x - \left( {\tfrac{\pi }{2} + i} \right)x & + \frac{1}{2}\log(2\pi) - \frac{1}{2}\log (1 + e^{ - 2\pi x} ) \\ & + i\sum\limits_{n = 1}^\infty  {\frac{{( - 1)^n (2^{1 - 2n}  - 1)B_{2n} }}{{2n(2n - 1)x^{2n - 1} }}} 
\end{align*}
as $x\to +\infty$ (see https://doi.org/10.2298/AADM130124002N). Differentiation yields
$$
\psi\! \left( {\tfrac{1}{2} + ix} \right) \sim \log x + \frac{{\pi}}{2}i\tanh (\pi x) + \sum\limits_{n = 1}^\infty  {\frac{{( - 1)^n (1 - 2^{1 - 2n} )B_{2n} }}{{2n}}\frac{1}{{x^{2n} }}} 
$$
as $x\to +\infty$. Now $\tanh (\pi x) - 1$ is exponentially small in comparison with the (divergent) algebraic expansion involving the Bernoulli numbers so it may seem superfluous. However, when the algebraic expansion is truncated at its least term, that is at $n \approx \pi x$, we find
$$
\left| {\frac{{( - 1)^n (1 - 2^{1 - 2n} )B_{2n} }}{{2n}}\frac{1}{{x^{2n} }}} \right| \sim \frac{2}{{\sqrt x }}e^{ - 2\pi x}  \ll \tanh (\pi x) - 1 \sim e^{ - 2\pi x} 
$$
(cf. http://dlmf.nist.gov/24.11.E2). Therefore, when the algebraic expansion is truncated optimally, the exponentially small contribution becomes relevant.
As a final remark, let me add that if you substitute the asymptotic expansion of $\psi(z)$ into the right-hand side of the functional equation (see http://dlmf.nist.gov/5.5.E8)
$$
\psi \!\left( {\tfrac{1}{2}+z} \right) = 2\psi (2z) - \psi (z) - 2\log 2
$$
you immediately obtain the asymptotic expansion of $\psi\!\left( { \frac{1}{2}+z} \right)$ without any tedious computation.
