alternating sums
- To: mathgroup at christensen.cybernetics.net
- Subject: [mg307] alternating sums
- From: Jack Goldberg <Jack.Goldberg at math.lsa.umich.edu>
- Date: Fri, 9 Dec 1994 12:21:07 -0500 (EST)
Here's an elementary question that has me partially stumped. I often have occasion to convert mylist = {a1,a2,a3,...} into an alternating sum, a1-a2+a3-a4+... . I find it aesthetically unsatisfactory to generate a list of alternating plus and minus ones, multiply mylist with the alternating list and then Apply Plus to the product. It works of course, but I have a feeling there is a much better way to do this. (This is clearly not of earthshaking importance!!. I'm just curious.) Jack Goldberg Univ of Mich Mathematics