<br><br><div class="gmail_quote">2008/7/8 N. J. A. Sloane <<a href="mailto:njas@research.att.com">njas@research.att.com</a>>:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Dear Sequence Fans, At present the entry reads as follows:<br>
<br>
%I A063979<br>
%S A063979 1,1,1,3,24,199,1747,16474,168187,1859934,22228104,286078171,<br>
%T A063979 3949867548,58284826485,915905054360,15276520209206,269617872744249,<br>
%U A063979 5021159048900643,98417586560408168,2025488254833817394<br>
%N A063979 Number of decimal digits in (n!)!; A000197.<br>
%H A063979 Eric Weisstein's World of Mathematics, <a href="<a href="http://mathworld.wolfram.com/Factorial.html" target="_blank">http://mathworld.wolfram.com/Factorial.html</a>">Factorial</a><br>

%p A063979 seq(length((n)!!), n=0..19); - Zerinvary Lajos (zerinvarylajos(AT)<a href="http://yahoo.com" target="_blank">yahoo.com</a>), Mar 10 2007<br>
%t A063979 Do[ Print[ Floor[ N[ Log[10, (n!)! ], 24] + 1]], {n, 0, 11} ]<br>
%Y A063979 Cf. A000197, A063944, A034886.<br>
%K A063979 base,nonn<br>
%O A063979 0,4<br>
%A A063979 Robert G. Wilson v (rgwv(AT)<a href="http://rgwv.com" target="_blank">rgwv.com</a>), Sep 05 2001<br>
%E A063979 More terms from Vladeta Jovovic (vladeta(AT)Eunet.yu), Sep 06 2001<br>
<br>
Dmitry Kamenetsky (<a href="mailto:dkamen@rsise.anu.edu.au">dkamen@rsise.anu.edu.au</a>), Jul 08 2008 says:<br>
<br>
%C A063979 for n=17, 18 and 19 I get 5021159048900644, 98417586560408160 and 20254882548338170<br>
88 respectively. This is slightly different to the quoted numbers. Can someone please verify t<br>
his?<br>
<br>
%o A063979 Here is my Python program:<br>
<br>
from math import sqrt, pi, log, e, floor<br>
<br>
def fact(n):<br>
       r = 1<br>
       for i in xrange(2, n+1):<br>
               r = r * i<br>
       return r<br>
<br>
<br>
def fact2(n):<br>
<br>
        n=fact(n)<br>
        b=(log(2*pi)+log(n))/2+(log(n)-1)*n<br>
        digits = int(floor(b/log(10)) + 1)<br>
        return digits<br>
<br>
<br>
for n in xrange(1,20):<br>
        print n,fact2(n)<br>
<br>
(end of quote)<br>
<br>
Which version is correct?<br>
<br>
Thanks<br>
Neil<br>
<br>
</blockquote></div><br>The original version is good. I've checked it by the following PARI-Gp program, using 40 digits precision is more than enough.<br><br>f(n)=a=n!;return(floor((a*log(a)-a+1/2*log(2*Pi*a)+1/(12*a))/log(10)+1)<br>
<br>I think the different answer is due to the precision in Python.<br>