MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: how to make Sum[n,{n,1,5}] to print 1+2+3+4+5? HoldForm?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg79389] Re: how to make Sum[n,{n,1,5}] to print 1+2+3+4+5? HoldForm?
  • From: Peter Breitfeld <phbrf at t-online.de>
  • Date: Wed, 25 Jul 2007 06:07:41 -0400 (EDT)
  • References: <f86qdq$o7p$1@smc.vnet.net>

Nasser Abbasi schrieb:
> hi, I am using version 6
>
> what is the trick to make Sum[] just print the terms first, before
> adding them? Say I want to do
>
> r= Sum[n,{n,1,5}]
>
> But I want to see  1+2+3+4+5, i.e. the terms printed out before they
> are actually added.
>
> then later I can do Evaluate[r] or N[r] something like this to get it
> to actually do the sum.
>

Try:

Sum[HoldForm[#]&[n],{n,1,5}]

Gruss Peter
-- 
==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==
Peter Breitfeld, Bad Saulgau, Germany -- http://www.pBreitfeld.de


  • Prev by Date: Re: Re: truncated File -> Save As -> HTML conversion problem
  • Next by Date: RE: Re: Re: Wolfram Workbench 1.1 now available
  • Previous by thread: Re: how to make Sum[n,{n,1,5}] to print 1+2+3+4+5? HoldForm?
  • Next by thread: Re: how to make Sum[n,{n,1,5}] to print 1+2+3+4+5? HoldForm?