If we have this summation
$$ \sum_{k=1}^n n^k $$
The time complexity of this function is O($n^{n+1}$). Why would that be? If I'm not mistaken this is a function which is the addition of n to all powers between 1 and n, meaning the term with the largest power, which dictates our time complexity, is $n^n$.
$$\sum_{k=1}^n n^k = \frac{n^{n+1}-1}{n-1} = O(n^n)\ \text{as}\ n \to \infty$$ But that doesn't prevent it from being $O(n^{n+1})$.
Check the definition.