Evaluating the expression: $\sum\limits_1^n(-1)^{k-1}\frac{n \choose k}{k^2}$

binomial-coefficientscoupon-collectorintegrationsummation

Per the title, I want to evaluate the expression:

$$S = \sum\limits_{k=1}^n(-1)^{k-1}\frac{n \choose k}{k^2}$$

Looked on Approach0 but no luck.

I think it has a nice closed form:

$$S = n^2\sum\frac{1}{i^2}+\left(n\sum \frac{1}{i}\right)^2$$


My attempt:

Using the Binomial theorem:

$$\frac{1-(1-x)^n}{x} = \sum\limits_{k=1}^n (-1)^{k-1}{n \choose k}{x^{k-1}}$$

Integrate both sides from $0$ to $x$.

$$\int\limits_0^x \frac{1-(1-x)^n}{x}dx = \sum\limits_{k=1}^n (-1)^{k-1}{n \choose k}\frac{x^{k}}{k}$$

For the LHS, let $1-x=u$

EDIT: as pointed out by FDP, this is where the issue was. Limits of the integral need to be changed as well. See answer below for correct version.

$$\int\limits_x^0 \frac{1-(u)^n}{1-u}(-du) = \sum\limits_{k=1}^n (-1)^{k-1}{n \choose k}\frac{x^{k}}{k}$$

$$=>\int\limits_0^x \left(\sum\limits_{k=0}^{n-1}u^{k} \right)du = \sum\limits_{k=1}^n (-1)^{k-1}{n \choose k}\frac{x^{k}}{k}$$

$$=>\sum\limits_{k=1}^{n}\frac{x^k} {k} = \sum\limits_{k=1}^n (-1)^{k-1}{n \choose k}\frac{x^{k}}{k}$$

$$=>\sum\limits_{k=1}^{n}\frac{x^{k-1}} {k} = \sum\limits_{k=1}^n (-1)^{k-1}{n \choose k}\frac{x^{k-1}}{k}$$

Integrating both sides from $0$ to $1$,

$$=>\int\limits_0^1\sum\limits_{k=1}^{n}\frac{x^{k-1}} {k} = \int\limits_0^1\sum\limits_{k=1}^n (-1)^{k-1}{n \choose k}\frac{x^{k-1}}{k}$$

$$=>\sum\limits_{k=1}^{n}\frac{1} {k^2} = \sum\limits_{k=1}^n (-1)^{k-1}{n \choose k}\frac{1}{k^2}\tag{1}$$

Equation (1) is incorrect as evidenced by substituting $n=2$. Where did I go wrong?


Why do I care about this? It comes up in calculating the variance of the generalized coupon collector's problem. See here.

Best Answer

The general expression given in comments can write $$S_n=\sum\limits_{k=1}^n(-1)^k\frac{n \choose k}{k^2}=\frac{\psi ^{(1)}(n+1)}{2}-\frac{\left(H_n\right){}^2}{2}-\frac{\pi ^2}{12}$$

For large enough values of $n$, you could use asymptotics and get $$S_n=\frac{1}{12} \left(6 \log ^2\left({n}\right)-12 \gamma \log \left({n}\right)-\pi ^2-6 \gamma ^2\right)-\frac{\log \left({n}\right)+\gamma -1}{2 n}+\frac{2 \log \left({n}\right)+2 \gamma -9}{24 n^2}+O\left(\frac{1}{n^3}\right)$$ which is in relative error lower than $0.1$% if $n \geq 4$ and lower than $0.01$% if $n \geq 7$ .

Related Question