MathGroup Archive 2005

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

Search the Archive

Re: "Alternating" function

  • To: mathgroup at
  • Subject: [mg63283] Re: [mg63260] "Alternating" function
  • From: Renan <renan.birck at>
  • Date: Thu, 22 Dec 2005 00:04:47 -0500 (EST)
  • References: <> <>
  • Sender: owner-wri-mathgroup at

On 12/21/05, Sseziwa Mukasa <mukasa at> wrote:

> One way is to use Fold instead of Nest
> Fold[x+#2 f[#1]&,x,Table[(-1)^i,{i,0,n-1}]

This does it neatly, and the other solutions also work.

Thanks to Wouter, Dave, Sseziwa, Ingolf and Bob, and all others that I
forgot to mention the name!


  • Prev by Date: Re: Convincing Mathematica that Sqrt[a+b]Sqrt[a-b]==Sqrt[a^2+b^2]
  • Next by Date: Returning an empty sequence
  • Previous by thread: "Alternating" function
  • Next by thread: Re: "Alternating" function