Utilizando la identidad
$$\int_0^{1} \left[\frac{1}{\log(s)}+\frac1{1-s}\right] \, ds= \gamma,$$
tenemos
$$\int_0^k \left(\int_1^2 \frac{(s+1)^{n-1}+s-1}{s} \, dn\right) \, ds \\ = \int_0^k \left(\int_1^2 \frac{(s+1)^{n-1}}{s} \, dn\right) \, ds +\int_0^k \left( 1- \frac1{s}\right) \, ds\\=\int_0^k \frac{1}{\log(s+1)} \, ds +\int_0^k \left( 1- \frac1{s}\right) \, ds\\=\int_1^{k+1} \frac{1}{\log(s)} \, ds +k-\int_1^{k} \frac1{s} \, ds-\int_0^{1} \frac1{s} \, ds\\=\int_1^{k+1} \frac{1}{\log(s)} \, ds +k-\log(k)-\int_0^{1} \frac1{s} \, ds\\=\int_0^{k+1} \frac{1}{\log(s)} \, ds -\int_0^{1} \left[\frac{1}{\log(s)}+\frac1{1-s}\right] \, ds +k-\log(k)\\= \text{li}(k+1) +k - \log(k) - \gamma$$