A347932 Least m such that the first n digits (after the decimal point) of e and Sum_{k=0..m} 1/k! are the same.
4, 5, 6, 7, 9, 9, 10, 11, 12, 13, 14, 16, 16, 16, 17, 18, 19, 20, 20, 22, 22, 22, 23, 24, 24, 26, 26, 27, 28, 28, 29, 30, 30, 31, 31, 32, 33, 33, 34, 35, 35, 36, 36, 37, 38, 38, 39, 40, 40, 41, 42, 42, 43, 43, 44, 45, 45, 46, 46, 47, 48, 48, 49, 50, 50
Offset: 1
Crossrefs
Cf. A001113.
Programs
-
Mathematica
a[n_] := Module[{e = Floor[10^n*E], s = 0, k = 0}, While[Floor[10^n*s] != e, s += 1/k!; k++]; k - 1]; Array[a, 65] (* Amiram Eldar, Sep 20 2021 *)