%I #19 Feb 22 2020 22:14:07
%S 3,4,6,7,8,9,10,11,12,13,14,14,15,16,17,18,18,19,20,21,21,22,23,24,24,
%T 25,26,26,27,28,29,29,30,31,31,32,33,33,34,34,35,36,36,37,38,38,39,40,
%U 40,41,41,42,43,43,44,44,45,46,46,47,47,48,49,49,50,50,51,52,52,53,53
%N Number of factorials < 10^n.
%C A181590(150) = 95 does not agree with a(150) = 96.
%C 0! and 1! are the same number so a(n) counts it as 1 number.
%C 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
%H Giovanni Resta, <a href="/A243293/b243293.txt">Table of n, a(n) for n = 1..10000</a>
%e There are 4 factorials < 10^2: 0! = 1! = 1, 2! = 2, 3! = 6, and 4! = 24. Thus a(2) = 4.
%t 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 *)
%o (PARI) a(n) = {my(tot=0); for(k=1,10^n,if(k!<10^n,tot++); if(k!>=10^n, break)); return(tot)}
%o n=1; while(n<100,print1(a(n),", "); n++)
%Y Cf. A000142, A181590.
%K nonn
%O 1,1
%A _Derek Orr_, Jun 02 2014