What is $\sum_{i = 1}^n i^i$? How about $\sum_{i = 1} ^ n i ^ {1/i}$? I was doing some sums when this idea popped into my head. What is the $$\sum_{i=1}^n i^i$$ I have been trying to find a relation using induction but hadn't had any succes. Any other ideas? What about this other one? $$\sum_{i = 1} ^ n i ^ {1/i}$$
 A: Asymptotic expansions for these sums can be obtained as follows.
Consider the first sum. We can write
$$
\sum\limits_{i = 1}^n {i^i }  = \sum\limits_{i = 0}^{n - 1} {(n - i)^{n - i} }  = n^n \sum\limits_{i = 0}^{n - 1} {\frac{1}{{n^i }}\left( {1 - \frac{i}{n}} \right)^{n - i} } .
$$
Now
$$
\left( {1 - \frac{i}{n}} \right)^{n - i}  = \exp \left( {n\log \left( {1 - \frac{i}{n}} \right) - i\log \left( {1 - \frac{i}{n}} \right)} \right)
$$
and, by Taylor expansion,
$$
\log \left( {1 - \frac{i}{n}} \right) =  - \sum\limits_{k = 1}^\infty  {\frac{{i^k }}{k}\frac{1}{{n^k }}} .
$$
Substituting the latter into the former and expanding the exponential, we eventually find
$$
\left( {1 - \frac{i}{n}} \right)^{n - i}  = e^{ - 1} \left( {1 + \frac{{i^2 }}{2}\frac{1}{n} + \frac{{i^3 (3i + 4)}}{{24}}\frac{1}{{n^2 }} +  \cdots } \right).
$$
Substituting these expansions into the expression for $\sum_{i=1}^n i^i$ and re-arranging, we deduce
$$\boxed{
\sum\limits_{i = 1}^n {i^i }  \sim n^n \left( {1 + \frac{1}{e}\frac{1}{n} + \left( {\frac{1}{{2e}} + \frac{1}{{e^2 }}} \right)\frac{1}{{n^2 }} + \left( {\frac{7}{{24e}} + \frac{2}{{e^2 }} + \frac{1}{{e^3 }}} \right)\frac{1}{{n^3 }} +  \cdots } \right)}
$$
as $n\to +\infty$. The general term may be written $P_k (e^{ - 1} )n^{-k}$, where $P_k$ is a polynomial of degree $k$. A more detailed analysis shows that
$$
P_k (x) = \frac{1}{{k!}}\sum\limits_{j = 0}^k {\left[ {\frac{{d^k }}{{dt^k }}\left( {t^j \exp \left( {\sum\limits_{p = 1}^{k - j} {\frac{{j^{p + 1} }}{{p(p + 1)}}t^p } } \right)} \right)} \right]_{t = 0} x^j } .
$$
Consider now the second sum. We can write
$$
\sum\limits_{i = 1}^n {i^{1/i} }  = n + \sum\limits_{i = 1}^n {\frac{{\log i}}{i}}  + \sum\limits_{i = 1}^n {\frac{1}{2}\left( {\frac{{\log i}}{i}} \right)^2 }  + \sum\limits_{i = 1}^n {\left( {i^{1/i}  - 1 - \frac{{\log i}}{i} - \frac{1}{2}\left( {\frac{{\log i}}{i}} \right)^2 } \right)} .
$$
By the  Euler–Maclaurin formula,
$$
\sum\limits_{i = 1}^n {\frac{{\log i}}{i}}  = \frac{{\log ^2 n}}{2} + \frac{{\log n}}{{2n}} + a + \mathcal{O}\!\left( {\frac{{\log n}}{{n^2 }}} \right),
$$
$$
\sum\limits_{i = 1}^n {\frac{1}{2}\left( {\frac{{\log i}}{i}} \right)^2 }  =  - \frac{{\log ^2 n + 2\log n + 2}}{2n} + b + \mathcal{O}\!\left( {\frac{{\log ^2 n}}{{n^2 }}} \right)
$$
and
$$
\sum\limits_{i = 1}^n {\left( {i^{1/i}  - 1 - \frac{{\log i}}{i} - \frac{1}{2}\left( {\frac{{\log i}}{i}} \right)^2 } \right)}  = c + \mathcal{O}\!\left( {\frac{{\log ^3 n}}{{n^2 }}} \right)
$$
with some constants $a$, $b$, and $c$. Consequently,
$$\boxed{
\sum\limits_{i = 1}^n {i^{1/i} }  = n + \frac{{\log ^2 n}}{2} + \kappa  - \frac{{\log ^2 n + \log n + 2}}{{2n}}+\mathcal{O}\!\left( {\frac{{\log ^3 n}}{{n^2 }}} \right)}
$$
as $n\to +\infty$, with some constant $\kappa$. Solving for $\kappa$ and taking $n$ large, it is found that $\kappa = 0.988549601142269\ldots$. With more work, one can derive an asymptotic expansion of the form
$$
\sum\limits_{i = 1}^n {i^{1/i} }  \sim n + \frac{{\log ^2 n}}{2} + \kappa  + \sum\limits_{k = 1}^\infty  {\frac{{Q_{k + 1} (\log n)}}{{n^k }}} 
$$
where $Q_k$ is a polynomial of degree $k$. I did not make an attempt to obtain a formula for these polynomials though.
