The Abel–Plana formula compares the sum $\sum_{n=0}^\infty f(n)$ to the integral $\int_0^\infty f(x)\,dx$, \begin{equation} \sum_{n=0}^{\infty}f\left(n\right)-\int_{0}^{\infty}f\left(x\right)dx=\frac{1}{2}f(0)+i\int_{0}^{\infty}\frac{f\left(ix\right)-f\left(-ix\right)}{e^{2\pi x}-1}\,dx.\tag{1}\label{1} \end{equation} In applications to the Casimir force between two mirrors one is interested in the effect of different boundary conditions on the mirrors, producing a fractional offset $\nu\in(0,1)$ of the index $n$, so one wishes to compare $\sum_{n=0}^\infty f(n+\nu)$ to the same integral $\int_0^\infty f(x)\,dx$.

The fractional offset $0<\nu<1$ can be accounted for by a phase shift in the Abel–Plana formula, \begin{equation} \sum_{n=0}^\infty f(n+\nu)-\int_{0}^{\infty}f(x)\,dx=i\int_0^\infty \left(\frac{f(ix)}{e^{2\pi (x+ i\nu)}-1}-\frac{f(-ix)}{e^{2\pi (x- i\nu)}-1}\right)\,dx.\tag{2}\label{2} \end{equation} Note that there is no $f(0)$ term on the r.h.s.

**Q:** I would like to be able to refer to \eqref{2}, is it in the literature? Alternatively, I would be happy to refer to an MO answer that derives it.

**Notes:**

Ramanujan gives several generalizations of the Abel-Plana formula \eqref{1}, including the case of a $\nu=1/2$ offset, and a formula that follows from \eqref{2} by subtracting the offsets $\nu=(1\pm\alpha)/2$, with $0<\alpha<1$:
$$\sum_{n=0}^\infty[f(2n+1-\alpha)-f(2n+1+\alpha)]=\frac{\sin\pi\alpha}{2}\int_0^\infty\frac{f(ix)+f(-ix)}{\cosh\pi x + \cos \pi\alpha}\,dx.\tag{3}\label{3}$$
_{See Ramanujan and Koshliakov meet Abel and Plana by B.C. Berndt et al.}

I could not find the formula \eqref{2} itself in Ramanujan's notebook (although I don't doubt that he knew it).

A more modern derivation for the case of a $\nu=1/2$ offset can be found in Appendix B.2 of Phys.Rev.Research **3**, 023201 (2021).