We can consider the generalized Harmonic numbers $$H\_{n,m} := \sum\_{k=1}^{n} \frac{1}{k^{m}} $$ as a partial version of the Riemann zeta function, because $$\lim\_{n \to \infty} H\_{n,m} = \zeta(m). $$


We could also define the "partial Sophomore's Dream function" $$S\_{r} := \sum\_{q=1}^{r}\frac{1}{q^{q}} ,$$
as we have $$\lim\_{r \to \infty} S\_{r} := S= \int\_{0}^{1}x^{-x}dx ,$$ where the integral on the right is equal to the first Sophomore's Dream constant.



> 
> **Question**: while studying the series $$A := \sum\_{r=1}^{\infty}(S-S\_{r}) \approx 0.3371877158, $$ I was wondering whether the function $S\_{r}$ has already been studied, and if someone has coined a name for it that is hopefully less awkward than mine. I am looking for alternative representations of $S\_{r}$ that might help finding a closed form of $A$.
> 
> 
> 


**Note**: this question was previously [asked](https://math.stackexchange.com/questions/4369181/has-the-partial-sophomores-dream-function-been-studied-before) on MSE.



Has the "partial Sophomore's Dream function" been studied before?
We have that $S=\sum\_{n=1}^\infty \frac 1 {n^n}$ and $S\_r=\sum\_{n=1}^r \frac 1 {n^n}$. Thus,


$A=\sum\_{r=1}^\infty \sum\_{n=r+1}^\infty \frac 1 {n^n} = \sum\_{n=2}^\infty \sum\_{r=1}^{n-1} \frac 1 {n^n}$


But then, $A=\sum\_{n=2}^\infty \frac {n-1} {n^n}$. To evaluate this, consider the integral $\int\_0^1 t^{-tx} dt = \sum\_{n=1}^\infty \frac {x^{n-1}} {n^n}$. Differentiating with respect to $x$, we get $\sum\_{n=2}^\infty \frac {(n-1)x^{n-2}} {n^n} = \int\_0^1 -t\ln t \cdot t^{-xt} dt$. And substituting $x=1$ finally gives


$A=\int\_0^1 -\ln t \cdot t^{1-t} dt$.


Note that a WolframAlpha calculation gives 0.3371877 as the value of the integral, in excellent agreement with the value you obtained.


