Extending Sophomore's Dream to include a constant in the exponent. I am trying to extend the Sophomore's Dream by proving the formula: 
$$\int _0^1\limits  x^{a-x}\text d x=\sum _{n=1}^\infty \limits \frac{1}{(a+n)^n}$$
I have tried induction, integration by parts, and using the same proof as here and substituting $a-x$, but haven't had much luck.
Thanks in advance!
 A: $$
x^{a-x}=x^a e^{-x\ln x}=x^a\left(\sum_{n=0}^{\infty}(-1)^n\frac{x^n\ln^n x}{n!}\right)=\sum_{n=0}^{\infty}(-1)^n\frac{x^{n+a}\ln^n x}{n!}.
$$
Intergrate by parts
$$
\int_0^1 (-1)^n\frac{x^{n+a}\ln^n x}{n!}\mathrm{d}x=(-1)^{n}\frac{x^{n+a+1}\ln^n x}{(n+a+1)n!}|_{x=0}^{x=1}+(-1)^{n-1}\int_0^1 \frac{x^{n+a}\ln^{n-1}x}{(n+a+1)(n-1)!}\mathrm{d}x
$$
$$
=\cdots=\frac{1}{(n+a+1)^{n+1}}.
$$
Hence we have
$$
\int _0^1\limits  x^{a-x}\text d x=\sum _{n=1}^\infty \limits \frac{1}{(a+n)^n}.
$$ 
A: $$\int _0^1\limits  x^{a-x}\text d x=\int_0^1e^{(a-x)\ln(x)}dx=\int_0^1\sum_{n=0}^\infty\frac{((a-x)\ln(x))^n}{n!}dx=\sum_{n=0}^\infty\frac{1}{n!}\int_0^1((a-x)\ln(x))^ndx$$
Let $u=-\ln(x)$ and $-e^udu=dx$
So $$\sum_{n=0}^\infty\frac{1}{n!}\int_0^1((a-x)\ln(x))^ndx=\sum_{n=0}^\infty\frac{1}{n!}\int_0^\infty(e^{-u}-a)^nu^ne^udu$$
Now recall that $n!=\int_0^\infty u^n e^{-u}du$
Can you continue from here?
A: Although, the answer is already published, I would like to leave a comment here. There is a nice “umbral calculus” method, which is, of course, the same, but is pretty intuitively clear.
Consider the Taylor formulas:
$$
f(\partial/\partial x) e^{Ax}=f(A)e^{Ax}, ~~e^{A\partial/\partial x}f(x)=f(x+A); 
$$
the identity
$$f(\partial/\partial x)g(x)|_{x=0}=\sum_{n=0}^\infty \frac{f^{(n)}(0)g^{(n)}(0)}{n!}=g(\partial/\partial x)f(x)|_{x=0} ;$$
and the equality $\frac{1}{x}=\int_0^{\infty} e^{-xt}dt$.
Then:
\begin{align*}
\sum_{n=1}^\infty \frac{x^n}{(n+a)^n}&=\sum_{n=1}^\infty \frac{(-1)^{n-1}x^n (\partial/\partial y)^{n-1}}{(n-1)!}~ \frac{1}{n+a+y}\Big|_{y=0}=\\
~\\
&=\sum_{n=1}^\infty \frac{(-1)^{n-1}x^n (\partial/\partial y)^{n-1}e^{(n-1+a)\partial/\partial y}}{(n-1)!}~ \frac{1}{1+y}\Big|_{y=0}=\\
~\\
&=x\exp\left(a\frac{\partial}{\partial y}-x\frac{\partial}{\partial y}e^{\partial/\partial y}\right)~\frac{1}{1+y}\Big|_{y=0}=\\
~\\
&=\frac{1}{1+\frac{\partial}{\partial y}}~x\exp\left(ay-xye^{y}\right)\Big|_{y=0}=\\
~\\
&=\int_{0}^{\infty} e^{-t-t\partial/\partial y}dt ~~~ x\exp(ay-xye^y)\Big|_{y=0}=\\
~\\
&=x\int_{0}^\infty e^{-t}\exp(a(y-t)-x(y-t)e^{y-t})dt\Big|_{y=0}=\\
~\\
&=x\int_{0}^\infty e^{-t(1+a)+xte^{-t}}dt=\\
~\\
\tag*{qed}&=x\int_{0}^{1} t^{a-xt}dt
\end{align*}
