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.
Per comment by @FDP, I managed to correct the Math. Starting over:
Using the Binomial theorem:
$$\frac{1-(1-t)^n}{t} = \sum\limits_{k=1}^n (-1)^{k-1}{n \choose k}{t^{k-1}}$$
Integrate both sides from $0$ to $x$.
$$\int\limits_0^x \frac{1-(1-t)^n}{t}dx = \sum\limits_{k=1}^n (-1)^{k-1}{n \choose k}\frac{x^{k}}{k}$$
For the LHS, let $1-t=u$
$$\int\limits_1^{1-x} \frac{1-(u)^n}{1-u}(-du) = \sum\limits_{k=1}^n (-1)^{k-1}{n \choose k}\frac{x^{k}}{k}$$
$$\frac{\sum\limits_{k=1}^n\frac{1-(1-x)^k}{k}}{x} = \sum\limits_{k=1}^n (-1)^{k-1} \frac{n\choose k}{k}x^{k-1}$$
Integrate both sides from $0$ to $1$, we get:
$$\sum\limits_{k=1}^n \frac 1 k \int\limits_0^1 \frac{1-(1-x)^k}{x} dx = \sum \frac{n \choose k}{k^2} (-1)^{k-1}$$
Substituting $1-x=t$ in the integral and expanding the geometric series we get:
$$\sum\limits_{k=1}^n \frac 1 k \sum\limits_{j=1}^k \frac 1 j = \sum \frac{n \choose k}{k^2} (-1)^{k-1} = \sum\limits_{k=1}^n\sum\limits_{j=1}^k \frac {1}{jk}$$
This can very easily be extended to $k^r$ in the denominator: $$\sum_{k=1}^n(-1)^{k-1}\frac{n\choose k}{k^r}=\sum_{i_1<i_2<\dots <i_r}\frac{1}{i_1 i_2 \dots i_r}$$
and the following code verifies this upto three terms in the denominator: