A063979 Number of decimal digits in (n!)!; A000197.
1, 1, 1, 3, 24, 199, 1747, 16474, 168187, 1859934, 22228104, 286078171, 3949867548, 58284826485, 915905054360, 15276520209206, 269617872744249, 5021159048900643, 98417586560408168, 2025488254833817394, 43675043585825292775, 984729344827900257489, 23172929656443132617906
Offset: 0
Links
- Jon E. Schoenfield, Table of n, a(n) for n = 0..448 (first 100 terms from Robert G. Wilson v)
- Eric Weisstein's World of Mathematics, Factorial
Programs
-
Magma
// Using about 100 more digits of precision than needed. nMax:=30; SetDefaultRealField(RealField(Ceiling(Log(10,Factorial(nMax))+100))); a:=[]; for n in [0..nMax] do a[n+1]:=1+Floor(LogGamma(Factorial(n)+1)/Log(10)); end for; a; // Jon E. Schoenfield, Aug 07 2015
-
Maple
seq(length((n)!!), n=0..19); # Zerinvary Lajos, Mar 10 2007
-
Mathematica
LogBase10Stirling[n_] := Floor[ Log[10, 2 Pi n]/2 + n*Log[10, n/E] + Log[10, 1 + 1/(12n) + 1/(288n^2) - 139/(51840n^3) - 571/(2488320n^4) + 163879/(209018880n^5) + 5246819/(75246796800n^6)]]; (* A001163/A001164; good to at least a(1000) *) LogBase10Stirling[0] = LogBase10Stirling[1] = 0; Table[1 + LogBase10Stirling[n!], {n, 0, 101}] (* Robert G. Wilson v, Aug 05 2015 *)
-
PARI
\\ Using 100 digits of precision. a(n)=localprec(100); my(t=n!);return(floor((t*log(t)-t+1/2*log(2*Pi*t)+1/(12*t))/log(10)+1))\\ Robert Gerbicz, Jul 08 2008
Extensions
More terms from Vladeta Jovovic, Sep 06 2001
A correspondent reported that terms a(17) - a(19) shown here were wrong. That's not true, they are correct. The correspondent was using Python, where the default precision was not large enough to calculate these terms correctly. Thanks to Brendan McKay, Max Alekseyev and Robert Gerbicz for confirming the entries. - N. J. A. Sloane, Jul 08 2008
a(20) from Brendan McKay, Jul 08 2008
a(21)-a(22) from Hugo Pfoertner, Nov 25 2023