Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Solutions to expressions s.a.

$$ S(n)=\sum_{k=1}^{n}\frac{1}{k-r} = \psi_{0}(n-r+1)- \psi_{0}(1-r), $$

involves digamma function. For positive values it has the largest term $O(\log(n))$, but for negative it is dominated by a trigonometric term, $\pi \cot(\pi n)$, which is close or equal to $0$ for certain values.

My question is, where this trigonometric term comes from? There is nothing like this in Harmonic series.

share|cite|improve this question
up vote 2 down vote accepted

It comes, I think, from the formula

$$ \pi \cot(\pi z) = \frac{1}{z} + \sum_{k=1}^\infty \frac{2z}{z^2-k^2} = \frac{1}{z} + \sum_{k=1}^\infty \left( \frac{1}{k+z} - \frac{1}{k-z}\right) $$

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.