Re: Re: Summation question
- To: mathgroup at smc.vnet.net
- Subject: [mg85762] Re: [mg85743] Re: [mg85664] Summation question
- From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
- Date: Thu, 21 Feb 2008 18:01:28 -0500 (EST)
- References: <200802190647.BAA27190@smc.vnet.net> <200802201206.HAA29899@smc.vnet.net>
On 20 Feb 2008, at 13:06, Sseziwa Mukasa wrote: > > On Feb 19, 2008, at 1:47 AM, Robert Pigeon wrote: > >> Good day all, >> >> I want to make a summation like this: Sum[f[i],{i, start, >> finish}]. What I want is that the sum be over a specific set like >> {1,3,5,7,11,13}. So the sum would be : f[1]+f[3]+f[5]+f[7]+f[11]+f >> [13]. The >> set I want to use is the primes. So, how do I use, if possible, Sum >> over a >> specific set ? > > One way is to map the sum indices to the set elements eg: > > Sum[f[Prime[i]],{i,start,finish}] > > but this may present problems if the sum is over an infinite range. > > Regards, > > Sseziwa > In fact, Mathematica sometimes, understands infinte sums or products over the set of all primes, described in precisely this way. A famous example is: In[6]:= Product[1 - Prime[n]^(-z), {n, 1, Infinity}] Out[6]= 1/Zeta[z] Andrzej Kozlowski
- References:
- Summation question
- From: Robert Pigeon <robert.pigeon@videotron.ca>
- Re: Summation question
- From: Sseziwa Mukasa <mukasa@jeol.com>
- Summation question