login
Harmonic expansion (or factorial expansion) of the Euler-Mascheroni constant.
3

%I #20 May 22 2022 09:49:16

%S 0,1,0,1,4,1,4,1,3,0,2,3,0,5,14,12,16,14,7,13,18,17,19,11,22,13,13,26,

%T 12,16,2,26,1,2,28,18,3,27,31,27,9,7,37,28,13,26,2,34,29,47,49,34,39,

%U 10,0,42,1,9,42,1,32,61,23,57,42,32,2,12,32,32,48,42,49,15,14,39,48

%N Harmonic expansion (or factorial expansion) of the Euler-Mascheroni constant.

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

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/HarmonicExpansion.html">Harmonic Expansion</a>

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

%F Sum_{n>=1} a(n)/n! = Euler gamma = A001620. - _G. C. Greubel_, Nov 26 2018

%e Euler gamma = 0 + 1/2! + 0/3! + 1/4! + 4/5! + 1/6! + 4/7! + 1/8! + ...

%t With[{b = EulerGamma}, 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 = Euler; 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(EulerGamma(250))] cat [Floor(Factorial(n)*EulerGamma(250)) - n*Floor(Factorial((n-1))*EulerGamma(250)) : n in [2..80]]; // _G. C. Greubel_, Nov 26 2018

%o (Sage)

%o b = euler_gamma;

%o def A096622(n):

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

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

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

%Y Cf. A001620 (decimal expansion), A002852 (continued fraction).

%K nonn

%O 1,5

%A _Eric W. Weisstein_, Jul 01 2004