OFFSET
1,1
COMMENTS
A181590(150) = 95 does not agree with a(150) = 96.
0! and 1! are the same number so a(n) counts it as 1 number.
a(n) is also the number of terms needed in the series Sum_{k=0..m} 1/k! to calculate exp(1) with a precision of at least n - 1 digits, i.e., exp(1) - Sum_{k=0..a(n)}1/k! < 10^(-n). - Martin Renner, Feb 18 2020
LINKS
Giovanni Resta, Table of n, a(n) for n = 1..10000
EXAMPLE
There are 4 factorials < 10^2: 0! = 1! = 1, 2! = 2, 3! = 6, and 4! = 24. Thus a(2) = 4.
MATHEMATICA
f=1; t=0; n=10; L={}; While[Length[L] < 100, t++; f*=t; While[f > n, AppendTo[ L, t-1]; n *= 10]]; L (* Giovanni Resta, Feb 19 2020 *)
PROG
(PARI) a(n) = {my(tot=0); for(k=1, 10^n, if(k!<10^n, tot++); if(k!>=10^n, break)); return(tot)}
n=1; while(n<100, print1(a(n), ", "); n++)
CROSSREFS
KEYWORD
nonn
AUTHOR
Derek Orr, Jun 02 2014
STATUS
approved