Simple: use Table
Sum[i^2, {i, 3}] (* 14 *)
Table[i, {i, 3}] (* {1, 4, 9} *)
If you want the output to be displayed like a sum, use Row:
Row[%, "+"] (* 1 + 4 + 9 *)
And when you want to evaluate, simply use Total:
Total[%%] (* 14 *)
There is another solution (see David's comment):
Sum[(HoldForm[#] &)[i^2], {i, 3}] (* 1 + 4 + 9 *)
To explain how this works, let's look at it piece by piece: First, we create a pure function using & and #. Here are a couple of (mostly) equivalent definitions to explain it:
f[x_] := x^2 - x + 1
f = Function[x, x^2 - x + 1];
f = Function[#^2 - # + 1];
f = (#^2 - # + 1)&;
You can see that in this particular case the function simply applies HoldForm to the argument. We apply this function (with the regular [] syntax) to each summand. This has the effect of wrapping each summand in HoldForm before adding them together, preventing further evaluation of the function while displaying them normally:
%//InputForm (* HoldForm[1] + HoldForm[4] + HoldForm[9] *)
The trick is that simply using HoldForm[i] won't work, since HoldForm will prevent the summand from being evaluated, and it will remain i^2: you'd get i^2 + i^2 + i^2. However, the argument to our anonymous function is evaluated before being passed in, so HoldForm is applied after the summand is evaluated.
To evaluate, simply call ReleaseHold on the expression:
ReleaseHold[%] (* 14 *)
This removes all the HoldForms from the expression, allowing it to be evaluated completely.
HoldForm[Sum[ii, {ii,1,3}]]suffice? – David G. Stork Jan 28 '15 at 00:13Sum[ii,{ii,1,3}], instead of the actual summands1+2+3. – Kagaratsch Jan 28 '15 at 00:23{a + b + c} /. {a -> "1", b -> "2", c -> "3"}– martin Jan 28 '15 at 00:27@Mr.Wizardif you want me to see them in a timely fashion. You needs do seem simpler but I think that the existing answers are also applicable. Are you unhappy with the closure? – Mr.Wizard Jan 28 '15 at 04:25Functionhas one argument instead of two. – Mr.Wizard Jan 28 '15 at 22:28