# Asymptotics of the sum $1-2^x+3^x-4^x+\cdots+x^x$

What is the asymptotics of $1-2^x+3^x-4^x+\cdots+x^x$ as $x$ becomes big?

$x$ is odd only

-
Two answers were posted before anyone up-voted this question. – Michael Hardy Jun 3 '12 at 22:26

Write this as $$S(x) = x^x \sum_{n=1}^x (-1)^{n-1} \left(\frac{n}{x}\right)^x = x^x (-1)^{x-1} \sum_{k=0}^{x-1} (-1)^{k} \left(1-\frac{k}{x}\right)^x$$ As $x \to \infty$, $(1 - k/x)^x \to e^{-k}$, so (after justifying interchange of sum and limit by Dominated Convergence) $$(-1)^{x-1} S(x) x^{-x} \to \sum_{k=0}^\infty (-1)^k e^{-k} = \frac{e}{e+1}$$ Thus $S(x) \sim \dfrac{e}{e+1} (-1)^{x-1} x^{x}$
The denominator should be $e+1$. – anon Jun 3 '12 at 21:46
When $x$ is very large, the last term will dominate. If the $x^x$ term comes with a $+$ sign, $x$ must be odd. It becomes very large, going as $x^x$