I'm trying to construct a sum like this:
Sum[body, range]
where body
is
$$\frac{1}{\sqrt{n!}}+\frac{1}{\sqrt{(n+1)!}}+\frac{1}{\sqrt{(n+2)!}}+\frac{1}{\sqrt{(n+3)!}}$$
and range is $\{n,0,\infty \}$.
body = 1/Sqrt[n!] + 1/Sqrt[(1 + n)!] + 1/Sqrt[(2 + n)!] + 1/Sqrt[(3 + n)!];
range = {n, 0, Infinity};
This can be done by
Sum[Evaluate@body, Evaluate@range]
Out==>$$\sum _{n=0}^{\infty } \left(\frac{1}{\sqrt{n!}}+\frac{1}{\sqrt{(n+1)!}}+\frac{1}{\sqrt{(n+2)!}}+\frac{1}{\sqrt{(n+3)!}}\right)$$
But Mathematica takes a long time attempting to compute the sum, which I don't need it to do. Is there a way to prevent the computation of the sum but still evaluate the body
and range
parts?
I tried the Trott-Strzebonski in-place evaluation trick:
HoldForm[Sum[body, range]] /. Sequence[x__] :> RuleCondition[Evaluate[x]]
But it didn't work. Where did I do wrong?