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

%I #21 May 22 2022 09:49:06

%S 0,1,1,0,3,1,0,3,6,2,5,4,6,11,4,11,5,12,3,5,13,2,22,6,22,13,20,7,1,0,

%T 1,20,2,6,4,1,18,14,35,2,11,31,16,19,42,36,41,0,14,31,25,43,4,13,34,

%U 53,50,57,2,30,12,25,45,24,2,39,57,51,30,41,65,15,9,55,23,4,35,18,77,43

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

%H G. C. Greubel, <a href="/A067882/b067882.txt">Table of n, a(n) for n = 1..10000</a>

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

%F a(n) = floor(n!*log(2)) - n*floor((n-1)!*log(2)).

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

%t With[{b = Log[2]}, Table[If[n == 1, Floor[b], Floor[n!*b] - n*Floor[(n - 1)!*b]], {n, 1, 100}]] (* _G. C. Greubel_, Nov 26 2018 *)

%o (PARI) default(realprecision, 250); b = log(2); for(n=1, 80, print1(if(n==1, floor(b), floor(n!*b) - n*floor((n-1)!*b)), ", ")) \\ _G. C. Greubel_, Nov 26 2018

%o (Magma) SetDefaultRealField(RealField(250)); [Floor(Log(2))] cat [Floor(Factorial(n)*Log(2)) - n*Floor(Factorial((n-1))*Log(2)) : n in [2..80]]; // _G. C. Greubel_, Nov 26 2018

%o (Sage)

%o def A067882(n):

%o if (n==1): return floor(log(2))

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

%o [A067882(n) for n in (1..80)] # _G. C. Greubel_, Nov 26 2018

%Y Cf. A002162 (decimal expansion), A016730 (continued fraction).

%Y Cf. A322334 (log(3)), A322333 (log(5)), A068460 (log(7)), A068461 (log(11)).

%K easy,nonn

%O 1,5

%A _Benoit Cloitre_, Mar 10 2002