Do these series converge to logarithms?

You can write $T(n,k)=1-n1_{\{n\mid k\}}$. Then, for $\vert x\vert < 1$ look at the power series $$ \begin{align} \sum_{k=1}^\infty\frac{T(n,k)}{k}x^k&=\sum_{k=1}^\infty\frac{x^k}{k}-\sum_{k=1}^\infty1_{\{n\mid k\}}\frac{nx^k}{k}\\ &=\sum_{k=1}^\infty\frac{x^k}{k}-\sum_{k=1}^\infty\frac{x^{nk}}{k}\\ &=-\log(1-x)+\log(1-x^n)\\ &=\log\left(\frac{1-x^n}{1-x}\right)\\ &=\log(1+x+\cdots+x^{n-1}). \end{align}. $$ So, letting $x$ increase to 1, $$ \lim_{x\uparrow1}\sum_{k=1}^\infty\frac{T(n,k)}{k}x^k=\log n. $$ The fact that you can commute this limit with the summation to get $\sum_{k=1}^\infty T(n,k)/k$ follows from the fact the series converges uniformly (over $0 < x < 1$). You can show this by grouping together the consecutive positive terms where $n\nmid k$ to get a sequence with alternating signs and decreasing in magnitude. Then, truncating the series gives an error which is bounded by the following term. That is, $$ \left\vert\sum_{k=1}^{jn-1}\frac{T(n,k)}{k}x^k-\log(1+x+\cdots+x^{n-1})\right\vert \le \frac{-T(n,jn)}{jn}x^{jn}\le \frac1j. $$ Commuting the limit with a finite sum is no problem, so you get $$ \left\vert\sum_{k=1}^{jn-1}\frac{T(n,k)}{k}-\log n\right\vert\le\frac1j. $$


Yes. You can get the sums by differentiating the digamma function repeatedly. There is a good deal of information about the resulting polygamma functions, including series expressions, here. Your matrix version is a lot more visually arresting than the usual Dirac delta function formulation!


@Marek,

For me the hint was in http://oeis.org/A097321, from which the numerators for log(3) are 1,1,-2.

Now log(2) having 1, -1

and log(3) having 1, 1, -2

suggests the pattern.


The formula seem to be extendable to fractional arguments of the log. The key is to rewrite the formula for $\log(x)$ as difference of two sums but to a common limit. So we can write $$ \begin{eqnarray} \log(x) &=& \lim_{n\to \infty} \sum_{k=1}^n {1 \over k} - x\sum_{k=1}^{\lfloor n/x \rfloor} {1 \over x k} \\ &=& \lim_{n\to \infty} \sum_{k=1}^n {1 \over k} - \sum_{k=1}^{\lfloor n/x \rfloor} {1 \over k}\\ &=& \lim_{n\to \infty} \sum_{k=\lfloor n/x \rfloor+1}^n {1 \over k} \end{eqnarray} $$ It seems to be a possible improvement to take the mean of the two sums when the initial index is either $ \lfloor n/x \rfloor $ or $ \lfloor n/x \rfloor +1 $ . So the final best (but not too complicated) approximation might be $$ \begin{eqnarray} w_n &=& \lfloor n/x \rfloor\\ \log(x) &=& \lim_{n\to \infty} {1\over2w_n} + \sum_{k=w_n+1}^n {1 \over k} \end{eqnarray} $$ However, for reasonable digits of precision one needs many many terms, so this might be only of formal interest.
Moreover, maybe the formula in this notation is also known; I vaguely think I've seen series-formulae involving the floor-function in this or related ways...

[update] There is one more...
To think of fractional summation-bounds suggests to consider integration instead of sums. So I tried $$ \log(x) = \lim_{n \to \infty} \int_{n/x} ^n \frac 1t dt $$ and then even $$ \log(x) = \lim_{n \to \infty} \int_n^{nx} \frac 1t dt $$ and after that even could let n finite...
and the perfect result (even for small n) $$ \log(x) \underset{n \gt 0}{=} \int_n^{nx} \frac 1t dt $$ suggests to look into wikipedia to see, who had noticed that first... ;-) and it's nice to see the identity of the integral-definition and the simple reformulation and generalization of your surprising patterns.


For computing $log(\frac{p}{q})$ we can take $p$ positive terms from the harmonic series and $n$ negative ones at each step.

$$ \log\left(\frac{p}{q}\right)=\sum_{i=0}^\infty \left(\sum_{j=pi+1}^{p(i+1)}\frac{1}{j}-\sum_{k=qi+1}^{q(i+1)}\frac{1}{k}\right) $$

Sequence https://oeis.org/A166871 in the OEIS illustrates case $\frac{p}{q}=\frac{3}{2}$

This generalizes by using sequences as summation limits: https://math.stackexchange.com/a/1609512/134791