MathGroup Archive 2011

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

Search the Archive

Re: How to create such a list

  • To: mathgroup at smc.vnet.net
  • Subject: [mg118462] Re: How to create such a list
  • From: Stefan <wutchamacallit27 at gmail.com>
  • Date: Fri, 29 Apr 2011 07:29:50 -0400 (EDT)
  • References: <ipbg0i$agm$1@smc.vnet.net>

On Apr 28, 6:37 am, Dominic Woerner <dominic.woer... at mpi-hd.mpg.de>
wrote:
> Hi,
>
> I like to create a list of the form:
> 0,w[1],...,w[n],w[1]+w[2],...,w[1]+w[n],w[2]+w[3],......,w[1]+...+w[n]
> for arbitrary n
> Is there a neat way to do this?
>
> Cheers,
> Dominic

I believe this is what you're looking for:

With[{n = 5}, Table[Sum[w[i], {i, 1, k}], {k, 0, n}]]

-Stefan Salanski


  • Prev by Date: Re: Limit[f[x], x->a] vs. f[a]. When are they equal?
  • Next by Date: Re: How to create such a list
  • Previous by thread: How to create such a list
  • Next by thread: Re: How to create such a list