OFFSET
0,2
COMMENTS
I employed R. Wm. Gosper's approximation (A090583).
LINKS
Google-tm Answers, mathtalk-ga on Apr 16 2005 19:20 PDT
Eric Weisstein's World of Mathematics, Stirling's Approximation.
EXAMPLE
(10^1)! = 3628800 begins with 3.
(10^6)! begins with 8 and (10^100)! begins with 1.
MATHEMATICA
f[n_] := IntegerPart[ 10^FractionalPart[ N[(n*Log[n] - n + (1/2) Log[2 Pi*n + 1/3])/Log[10], 150]]]; f[1] = 1; Table[ f[10^n], {n, 0, 104}]
PROG
(PARI) a(n)=my(g=lngamma(10^n+1)/log(10)); g-=g\1; 10^g\1 \\ Charles R Greathouse IV, Jan 09 2013
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Robert G. Wilson v, Jan 09 2013
STATUS
approved