OFFSET
1,2
COMMENTS
For k = 1, 22, 23 and 24 only, the number of digits in k! is equal to k. - Bernard Schott, Feb 02 2013
I employed R. Wm. Gosper's approximation (A090583). - Robert G. Wilson v, Feb 04 2013
For large m, 10^m*C -> 10^m*e, where e is Euler's or Napier's constant (A001113). Conjecture: There exist at least two contiguous terms for each k > 0, sometimes three contiguous terms, but never four. - Robert G. Wilson v, Feb 04 2013
REFERENCES
Gardner, M. "Factorial Oddities." Ch. 4 in Mathematical Magic Show: More Puzzles, Games, Diversions, Illusions and Other Mathematical Sleight-of-Mind from Scientific American. New York: Vintage, pp. 50-65, 1978
D. Wells, Curious and Interesting Numbers, Penguin Books, 1997, page 78.
LINKS
Robert G. Wilson v, Table of n, a(n) for n = 1..102
Eric Weisstein's World of Mathematics, Stirling's Approximation
EXAMPLE
23! = 25852016738884976640000 has 23 digits.
MATHEMATICA
fQ[n_] := Mod[ Floor[(n*Log[n] - n + Log[(2 n + 1/3) Pi]/2)/Log[10] + 1], n] == 0; k = 1; s = {}; While[k < 1000001, If[ fQ@ k, AppendTo[s, k]; Print[k]]; k++]; s (* Robert G. Wilson v, Feb 04 2013 *)
PROG
(PARI)
A034886(n)= /* Number of digits in n! */;
{ if(n==0, 1, 1 + floor((-n + (2*n+1)*log(n)/2 + 1/2*log(2*Pi))/log(10)) + (n==1)); }
goA058814(maxsearch)= /* write b-File for A058814 */
{ my(k=0); for(n=1, maxsearch, if(A034886(n)%n==0, k++; print(k" "n); write("b058814.txt", k" "n); )); }
/* Enrique Pérez Herrero, Jun 05 2011 */
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Robert G. Wilson v, Jan 03 2001
STATUS
approved