[seqfan] Computing ln(n!) with Bernoulli

Wouter Meeussen eu000949 at pophost.eunet.be
Thu Apr 30 20:26:33 CEST 1998


hi,

in Mathematica 3.0, (unless it spoils the fun in 2.5 seconds) :
 N[LogGamma[E^1000],1000] =

=
\!\(1.968101042903029946894990472891079802191621047338521944162850188393678786\
931658752281503098486463863041032854169532706709046998748814068286333395208764\
926724070882146344149821894360792960351852833510443594876928483133401448444437\
186557293224501201548123944288515527370759106138162478415245561077912335670642\
018979402583072861763497200138764760004892916442684630555566067703929680161878\
794447998170624906933357461383453195409970271433501594499890556840696015953390\
420624085870902353080882286185962197055594818868295957323025862838102716050807\
002200701869111968478948387978349899395791073898214510385823070733494254841446\
406965774658123482072217621953264377619212667125219818229610621566800169571486\
042124773471235801909756765135645729805080119060781454818659547259635898468485\
177301009912721510246450952341186186766911429287696832029758706499911130415215\
328103662962249055951099437561937551438223085202763582821503141113890246608371\
805818458507804379795482687290427641826221618863424422845046021604151078891998\
087`1000*^437\)

wouter.
*****************************************************************************


At 07:17 30-04-98 -0700, Joe Crump wrote:
>Hi all,
>
>	What is a good (or the best known) way of calculating the
>n'th Bernoulli number?
>
>	For reference, or maybe so you can advise me whether my goal
>is feasible. I'm trying to compute ln(n!) efficiently, or find out
>if it is even possible for n>e^1000.
>
>	I'm currently playing with...
>
>	ln(n!) = (n+1/2) ln n - n + ln(sqrt(2Pi)) + sum(1..threshold, of
>(B_k(-1)^(k+1)) / (k(k-1)n^(k-1))
>
>>From Knuth (Fundamental algorithms, pg. 115), where B_k is the k'th Bern.
>
>	But, I'm not sure if this is the best way to go (or off hand how to
>compute the n'th Bernoulli numbers efficiently which is why I'm asking you
>folks :)).
>
>	Ideally, I'd like to be able to compute ln(n!) results for n
>up to (e^1000). That is, compute ln((e^1000)!) with atleast 100-200
>digits of accuracy. I'm not sure, without experimenting, whether or not 
>the ln(n!) expression above will give enough accuracy without an un-iterable
>Bernoulli sequence.
>
>	It seems though that it should be possible to compute. Note that
>although n!
>is ridiculously huge, it is less than n^n. This implies that ln(n!) is
>less than n*ln(n) since ln(n^n)=n*ln(n).
>
>	Any thoughts, suggestions?
>
>  Joseph K. Crump   (Email: joecr at microsoft.com)
>  Microsoft Developer Support
>
>If a packet hits a pocket on a socket on a port,
>And the bus is interrupted as a very last resort,
>And the address of the memory makes your floppy disk abort,
>Then the socket packet pocket has an error to report!
>
>What if Dr. Seuss wrote Computer Manuals?
>
>
>
Dr. Wouter L. J. MEEUSSEN
w.meeussen.vdmcc at vandemoortele.be
eu000949 at pophost.eunet.be



MIME-Version: 1.0







More information about the SeqFan mailing list