MathGroup Archive 2003

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

Search the Archive

Re: Summations with Primes

  • To: mathgroup at smc.vnet.net
  • Subject: [mg39953] Re: Summations with Primes
  • From: bobhanlon at aol.com (Bob Hanlon)
  • Date: Thu, 13 Mar 2003 03:01:14 -0500 (EST)
  • References: <b4mnus$imf$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

sumOverPrimes[expr_, 
      {i_Symbol, imin_Integer, imax_Integer}] :=
    Module[{k},
      Sum[expr /. i:>Prime[k], {k, PrimePi[imin], PrimePi[imax]}]];

sumOverPrimes[f[i], {i,3,15}]

f[3]+f[5]+f[7]+f[11]+f[13]


Bob Hanlon

In article <b4mnus$imf$1 at smc.vnet.net>, "Anthony Felder" <afelder at crsi.org>
wrote:

<< Subject:	Summations with Primes
From:		"Anthony Felder" <afelder at crsi.org>
To: mathgroup at smc.vnet.net
Date:		Wed, 12 Mar 2003 07:34:52 +0000 (UTC)


Can you tell me if, when calculating a summation of f(i) where i goes from
imin to imax, Mathematica can be forced to only use prime values for i?

Thank you for your time

Anthony Felder
 >>


  • Prev by Date: RE: Summations with Primes
  • Next by Date: a question about Hazard Rate
  • Previous by thread: RE: Summations with Primes
  • Next by thread: Re: Summations with Primes