Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #2006

Re: How to create such a list

From Stefan <wutchamacallit27@gmail.com>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: How to create such a list
Date 2011-04-29 11:29 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <ipe7f9$qr0$1@smc.vnet.net> (permalink)
References <ipbg0i$agm$1@smc.vnet.net>

Show all headers | View raw


On Apr 28, 6:37 am, Dominic Woerner <dominic.woer...@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

Back to comp.soft-sys.math.mathematica | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

How to create such a list Dominic Woerner <dominic.woerner@mpi-hd.mpg.de> - 2011-04-28 10:37 +0000
  Re: How to create such a list Peter Breitfeld <phbrf@t-online.de> - 2011-04-29 11:35 +0000
  Re: How to create such a list Stefan <wutchamacallit27@gmail.com> - 2011-04-29 11:29 +0000

csiph-web