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: [mg79387] Re: [mg79353] how to make Sum[n,{n,1,5}] to print 1+2+3+4+5? HoldForm?
  • From: "Thomas Dowling" <thomasgdowling at gmail.com>
  • Date: Wed, 25 Jul 2007 06:06:38 -0400 (EDT)
  • References: <200707250611.CAA22292@smc.vnet.net>

Hello,

I suppose you could use:

r = Table[n, {n, 1, 5}]

and then use either

Apply[Plus, r]

or

Total[r]

Tom Dowling

On 7/25/07, Nasser Abbasi <nma at 12000.org> wrote:
>
> 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.
>
> I tried the different Hold commands, but non seems to do it.
>
> thanks,
> Nasser
>
>
>



  • Prev by Date: RE: Re: Re: Wolfram Workbench 1.1 now available
  • Next by Date: Re: Expand all cells?
  • Previous by thread: 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?