Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2001
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2001

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

Search the Archive

Re: Sum

  • To: mathgroup at smc.vnet.net
  • Subject: [mg30151] Re: Sum
  • From: "marc jeanno" <ts at tsts.com>
  • Date: Wed, 1 Aug 2001 02:19:06 -0400 (EDT)
  • References: <9k5q80$h7j$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

<BobHanlon at aol.com> ha scritto nel messaggio
news:9k5q80$h7j$1 at smc.vnet.net...
>
>
> There was no question so I am guessing that you want a definition of s[n]
>
> s[n_Integer?Positive] := Sum[P[k]*Log[Sum[P[m], {m, k, n}]], {k, 1, n}];
>
> If not, resend your e-mail.




The method shown above is the one I used. But there is even something
faster:

f=Prime;
n=5000;        (for example)
it=Reverse[Table[k,{k,1,n-1}]];
Log[FoldList[#1+f[#2]&,f[n],it]]


this shows out:

{10.7941, 11.4867,... [cut] }

Now, the problem is to moltiplicate each term of the list whit his
corrispondent prime, and sum the whole thimg...
Any idea?

>
>
> Bob Hanlon
> Chantilly, VA  USA
>




  • Prev by Date: Re: View Evaluation-Progress
  • Next by Date: Re: Formatting numbers on Plot axis
  • Previous by thread: Re: View Evaluation-Progress
  • Next by thread: Re: Sum