MathGroup Archive 2003

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

Search the Archive

RE: nth differences

  • To: mathgroup at smc.vnet.net
  • Subject: [mg39862] RE: [mg39852] nth differences
  • From: "Harvey P. Dale" <hpd1 at nyu.edu>
  • Date: Sun, 9 Mar 2003 05:27:13 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

Zachary:
	After entering the list of k integers, evaluate the following:
				#[[2]]-#[[1]]&/@Partition[%,2,1]
Then you can evaluate exactly the same expression again, and again,
until the nth difference is a single number.  The easiest way to do that
is to type <ctrl>+L, which automatically inserts, for evaluation, the
prior input.
	Hope that helps.
	Best,
	Harvey

-----Original Message-----
From: Zachary Turner [mailto:_NOzturnerSPAM_ at cyberonic.com]
To: mathgroup at smc.vnet.net
Subject: [mg39862] [mg39852] nth differences

Say I have a list of k integers and I want to produce a list containing
the
first differences?  For example, given {1, 2, 5, 7, 8, 9} the first
differences are {1, 3, 2, 1, 1}, and the second differences are {2, -1,
-1,
0}, the third are {-3, 0, 1}, etc




  • Prev by Date: Re: nth differences
  • Next by Date: Re: Fwd: Antiderivatives and Definite Integrals
  • Previous by thread: Re: nth differences
  • Next by thread: Re: RE: nth differences