login
Factorial expansion of 1/exp(2) = Sum_{n>=1} a(n)/n!.
0

%I #8 May 24 2022 00:10:27

%S 0,0,0,3,1,1,3,0,6,4,7,5,2,9,9,8,10,8,9,1,13,18,1,2,8,15,26,10,22,1,

%T 18,9,20,10,2,6,13,19,16,38,38,3,32,5,39,24,7,27,14,41,20,39,32,7,20,

%U 35,44,50,24,34,51,14,39,47,49,15,61,54,60,52,34,60,32,72,48,12,67,52,22,48

%N Factorial expansion of 1/exp(2) = Sum_{n>=1} a(n)/n!.

%H <a href="https://oeis.org/index/Fa#facbase">Index entries for factorial base representation</a>

%e 1/exp(2) = 0 + 0/2! + 0/3! + 3/4! + 1/5! + 1/6! + 3/7! + 0/8! + 6/9! +...

%t With[{b = 1/E^2}, Table[If[n == 1, Floor[b], Floor[n!*b] - n*Floor[(n - 1)!*b]], {n, 1, 100}]]

%o (PARI) default(realprecision, 250); b = exp(-2); for(n=1, 80, print1(if(n==1, floor(b), floor(n!*b) - n*floor((n-1)!*b)), ", "))

%o (Magma) SetDefaultRealField(RealField(250)); [Floor(Exp(-2))] cat [Floor(Factorial(n)*Exp(-2)) - n*Floor(Factorial((n-1))*Exp(-2)) : n in [2..80]];

%o (Sage)

%o b=exp(-2);

%o def a(n):

%o if (n==1): return floor(b)

%o else: return expand(floor(factorial(n)*b) -n*floor(factorial(n-1)*b))

%o [a(n) for n in (1..80)]

%Y Cf. A092553 (decimal expansion), 0 U A001204 (continued fraction).

%Y Cf. A054977 (e), A067840 (e^2), A068453 (sqrt(e)), A237420 (1/e).

%K nonn

%O 1,4

%A _G. C. Greubel_, Dec 12 2018