# Ramanujan sum of a function which diverges bot at $0$ and $1$

Wikipedia gives the formulas for the Ramanujan summation of a divergent series in the two cases of a function which has no divergence at $x=0$ and at $x=1$ but what to do with a function which is divergent at both points at the same time ?

es. $$f(x)=\frac {2^x}{x^2-x}$$

Is there any method to generalize the summation formula to sum something like: $\sum_{k=2}^\infty \frac {2^k}{k^2-k}$ or it simply not Ramanujan summable ?

We may exploit: $$\frac{2^k}{k^2-k} = \frac{2^k}{k}-2\cdot\frac{2^{k-1}}{k-1}=\int_{0}^{2}\left(x^{k-1}-2\,x^{k-2}\right)\,dx$$ from which: $$\sum_{k=2}^{K}\frac{2^k}{k^2-k} = \int_{0}^{2}\frac{(2-x)(x-x^K)}{x(1-x)}\,dx=\int_{0}^{2}(2-x)(1+x+\ldots+x^{K-2})\,dx$$ so the only meaningful reguralization of the divergent series in the LHS is given by: $$PV \int_{0}^{2}\frac{2-x}{1-x}\,dx = PV\int_{-1}^{1}\frac{x-1}{x}\,dx =\color{red}{2}.$$